22.10.2010, 19:34
hey, i made this cmd thats if u use it more than 3 times it sends a message to admins saying %s(%i) is spamming nrg blocknrg him but if i use it once then i cant use it anymore because....
JUST look at the code
JUST look at the code
Код:
dcmd_nrg(playerid,params[]) { #pragma unused params new id,string[128],pName[MAX_PLAYER_NAME]; GetPlayerName(id,pName,sizeof(pName)); format(string, sizeof string, "%s(%i)passed /nrg limit /blocknrg him",pName,playerid); if(PInfo[playerid][blockednrg] == 1) return SendClientMessage(playerid,red,"ERROR: You cant use nrg[reason: spammed nrg cmd]"); if(PInfo[playerid][blockednrg] > 3) return MessageToAdmins(red, string); GetPlayerPos(playerid,X,Y,Z); PutPlayerInVehicle(playerid,CreateVehicle(522,X,Y, Z,0,-1,147,147),0); PInfo[playerid][blockednrg]++; return 1; }