Jump to content

[PAWNO] - Fakeban (Comanda pentru distractie)


D4N1EL
 Share

Recommended Posts

*Nume: FakeBan


*Descriere Script: Este un script pentru amuzament mai mult, atunci cand te joci cu cineva e amuzant sa ii dai kick ci nu ban :).


*Poze: Nu este nevoie.


*Codul (sursa):



//Acestea sunt define-uri care se trec la inceputul scriptului.
#define COLOR_GRAD2 0xBFC0C2FF
#define SCM SendClientMessage
#define COLOR_LIGHTRED 0xBFC0C2FF
//Aceasta este comanda propriu-zisa
if(strcmp(cmd, "/fakeban", true) == 0)//numele comenzii
{
if(IsPlayerConnected(playerid))//verifica daca esti conectat *da stiu, ciudat*
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Tasteaza: /fakeban [ID/nume jucator] [motiv]");//iti spune syntaxa (care este comanda si ce trebuie sa scri)
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 6)// [pAdmin] trebuie sa verificati daca nu cumva este diferit la dvs in GM, ">= 6" inseamna ca aceasta comanda o poate folosi doar un admin de lvl 6
{
if(IsPlayerConnected(giveplayerid))// verifica daca playerul ales este conectat
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
result[0] = toupper(result[0]);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Tasteaza: /fakeban [ID/nume jucator] [motiv]");// daca nu este introdus motiv va aparea iarasi acest mesaj
return 1;
}
format(string, sizeof(string), "AdmCmd: %s a primit ban de la Adminul %s, motiv: %s", giveplayer, sendername, (result));// mesajul care i se trimite jucatorului
SendClientMessage(giveplayer, COLOR_LIGHTRED, string);// SendClientMessage(giveplayer = id-ul ales, COLOR_LIGHTRED = culoarea textului string= mesajul de mai sus
Kick(giveplayerid);// ii da kick playerului (in gm vostru poate este altcumva)
return 1;
}
}
}
else// daca playerul nu are admin 6 va primi mesajul:
{
SCM(playerid, -1, "Server: UNknown command.");// acesta
return 1;
}
}
return 1;
}

Edited by D4N1
Link to comment
Share on other sites

2.Trebuie sa puneti in script-ul dumneavoastra comentarii cu // sau cu /* */

Ai la dispoziție 24 de ore să faci ca acest topic să arate ca un tutorial, altfel topicul va fii șters.

 

Done tati

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.