19.03.2011, 14:59
Код:
if(!strcmp(cmd, "/setscore",true) == 0) { { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You are not an admin !"); new targetid, score, string[128]; if(sscanf(params, "uz", targetid,score)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setscore [playerid/partofname] [score]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Player not connected!"); else { SetPlayerScore(targetid, score); format(string,sizeof(string),"an Admin has changed your Score to %s ", score); SendClientMessage(targetid, 0xA10000AA, string); } } return 1; }
Код:
if(!strcmp(cmd, "/asay1",true) == 0) { { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"You are not an admin !"); new text[128]; if(sscanf(params, "s[128]",text)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /asay [text]"); else { new string[128]; new pName[128]; GetPlayerName(playerid,pName,128); format(string,sizeof string,"[ADMIN]%s: %s",pName,text); SendClientMessageToAll(0xA10000AA,string); } } return 1; }