16.02.2010, 12:06
Someone point out why this crashes server when i try to use it on some one
thanks
thanks
Код:
dcmd_makeuca(playerid,params[]) { if(PlayerData[playerid][Owner] < 1) return SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not the owner"); new tmp[256],idx; tmp = strtok(params,idx); if(!strlen(tmp)) { SendClientMessage(playerid,WHITE,"Correct Usage: /makeuca [playerid]"); return true; } new otherplayer = strvalEx(tmp); if(!IsPlayerConnected(otherplayer)) { SendClientMessage(playerid,RED,"SERVER MESSAGE: Incorrect ID"); return true; } tmp = strrest(params,idx); new string[256], pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME]; GetPlayerName(otherplayer,pname,sizeof(pname)); GetPlayerName(playerid,pname2,sizeof(pname2)); PlayerData[otherplayer][ucadmin] = 1; format(string,sizeof(string)," You made %s UnderCover Admin. ", pname); SendClientMessage(playerid,COLOR_RED,string); SendClientMessage(otherplayer,COLOR_RED,"You have been made UnderCover Admin by %s check /ucacmds",pname2); return true; }