Originally Posted by CyberGhost
Note: Not tested, i was in a hurry
Ill edit the post later, bye :P
EDIT: ill edit /irc later and tell me if those commands under here work
pawn Код:
COMMAND:name(playerid, params[]) { if(PlayerInfo[playerid][power]>0 || PlayerInfo[playerid][premium]>0 || PlayerInfo[playerid][playerteam]==HITMAN || PlayerInfo[playerid][playerlvl]>=20) { if(!strlen(params)) { SendClientUsage(playerid, params, "[on/off]"); return 1; } if(strcmp(params,"on",true)==0) { PlayerTemp[playerid][hname]=0; GameTextForPlayer(playerid,"~g~ShowName ON",1000,1); for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i)) ShowPlayerNameTagForPlayer(i,playerid,1); } if(strcmp(params,"off",true)==0) { PlayerTemp[playerid][hname]=1; GameTextForPlayer(playerid,"~r~ShowName OFF",1000,1); for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i) && PlayerInfo[i][power]==0) ShowPlayerNameTagForPlayer(i,playerid,0); } else { SendClientError(playerid,"You can't use this command for now"); return 1; } } return 1; }
pawn Код:
COMMAND:jq(playerid, params[]) { if(!strlen(params)) { SendClientUsage(playerid, params, "[on/off]"); return 1; } if(strcmp(params,"on",true)==0) { PlayerTemp[playerid][jqmessage]=1; InfoText(playerid,"join/quit messages turned on",5); return 1; } else if(strcmp(params,"off",true)==0) { PlayerTemp[playerid][jqmessage]=0; InfoText(playerid,"join/quit messages turned off",5); return 1; } }
|