Fakeban

Započeo Boris, Septembar 05, 2009, 23:57:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

kako napravit komandu /fakeban?

//----------------------------fakeban---------------------------------------------------------------------------
if(strcmp(cmd, "/fakeban", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORSITI /fakeban [IgracevID/DioImena] [razlog]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
   if(IsPlayerConnected(giveplayerid))
   {
       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;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /fakeban [IgracevID/DioImena] [razlog]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "SERVER: %s je dobio/la ban od admina %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
format(string, sizeof(string), "SERVER: %s je dobio/la ban od admina %s, razlog: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
}
}//not connected
}
else
{
format(string, sizeof(string), "   %d Nije aktivan igrac.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}


Poslednja Izmena: Septembar 06, 2009, 00:20:12 PRE PODNE od [SB]Gunjac