Skip to content
View in the app

A better way to browse. Learn more.

OldStyle Gaming Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripting Pawno(pentru incepatori) #2

Salutare, astazi m-am gandit sa mai fac un tutorial.

M-am gandit sa o fac mai scurta(comanda) pentru a va fii mai usor sa intelegeti.

Sa incepem. Tin sa precizez, ca voi repeta pasi, desi i-am le-am spus pe unele in tutorialele trecute.

 

Astazi vom face comanda care poate fii folosita doar de un Admin(Rcon).

 

1.Include-urile

#include <a_samp>

#include <float>

#include <core>

#include <zcmd>
#include <streamer>

 

2. Define-urile(definitiile)

#define SCM SendClientMessage

 

#define COLOR_GREY         0xAFAFAFAA
#define COLOR_GREEN      0x33AA33AA
#define COLOR_RED           0xAA3333AA
#define COLOR_YELLOW    0xFFFF00AA
#define COLOR_WHITE      0xFFFFFFFF

 

3. Comenzile

Acum voi da exemplu o comanda care am mai folosit-o in trecut.(/healme)

Exista doua tipuri de a face comanda de Admin(Rcon).

 

Tip 1:

CMD:healme(playerid)
{

    if(IsPlayerAdmin(playerid)) // Verificam daca jucatorul este Admin(connectat Rcon)

    {

        SetPlayerHealth(playerid, 100);

        SCM(playerid, COLOR_RED, "Ti-ai setat 100 viata.");

    }

    else // Daca acesta nu este Admin, va primi[..]

    {

    SCM(playerid, -1, "Eroare: Nu esti logat ca Admin(Rcon)!"); // [..] acest mesaj. 

    return 1;
}

Tip 2:

CMD:healme(playerid)

{

    if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Eroare: Nu esti logat ca Admin(Rcon)!");  // Aici returnam direct.

    SetPlayerHealth(playerid, 100);

    SCM(playerid, COLOR_RED, "Ti-ai setat 100 viata.");

    return 1;
}

Bun. Acuma la Tip-ul 2, ati observat ceva diferit. if(!IsPlayerAdmin(playerid)) etc.

Da, Acel "!" fuctioneaza ca si opusul. Si haide sa facem comanda in romana(sa va fie mai usor sa memorati):

Daca jucatorul nu este Admin, returneaza Mesajul(jucatorului care a tastat comanda, culoarea, "Si ce mesaj doresti");

 

Multumesc pentru timpul acordat. Va rog sa imi spune-ti o nota(0/10) la acest tutorial si ce pot corecta(daca am gresit).

Ofer ajutor doar daca imi dati mesaj aici(pe forum) sau in joc.

Pentru a propune un anumit topic pentru o comanda/functie/etc o puteti lasa in mesajele topicului.

 

Nick: Alexandru05

Grad: Helper 1.

IP: 193.203.39.153:7777

DNS: RPG.OLDS.RO

Featured Replies

  • Founder

Super tare, frate! 

Felicitari! 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.