14.10.2010, 19:31
Hey Guys this time im talk series i realy need help or i get killed please here is too commands it work but lets take warn for example
when i do
/warn 0 Drive-By
its say to me unknow command but if i do 3 words only like /warn 0 ddd its work if you do more than 3 then unknown command
and in kill command when i use it i i do
/kill 0 you lag please rejoin
its not work why help me !!
when i do
/warn 0 Drive-By
its say to me unknow command but if i do 3 words only like /warn 0 ddd its work if you do more than 3 then unknown command
and in kill command when i use it i i do
/kill 0 you lag please rejoin
its not work why help me !!
Код:
dcmd_akill(playerid, params[]) { new player1, pID, Reason, name[MAX_PLAYER_NAME], string2[256], string[256]; if(Player[playerid][admin] < 4){ return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command"); } if(sscanf(params,"us",pID,Reason)){ return SendClientMessage(playerid,COLOR_RED,"USAGE: /akill [playerid] [reason]"); } if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!"); } if(Player[player1][admin]){ return SendClientMessage(playerid,COLOR_RED,"You can`t KILL yourself"); } if(Player[playerid][admin] < Player[pID][admin]){ return SendClientMessage(playerid,COLOR_RED,"You can`t KILL a high ranked admin"); } GetPlayerName(pID,name,sizeof(name)); format(string,sizeof(string),"**(ADMIN KILL)** %s(%d) %s",name,pID,Reason); format(string2,sizeof(string2),"You Have Been KILLED By Admin For Reason: %s",Reason); SendClientMessageToAll(COLOR_RED, string); SendClientMessage(pID, COLOR_RED, string2); SetPlayerHealth(playerid, 0.0); return 1; }
Код:
dcmd_warn(playerid, params[]) { new warnID; new Reason; new player1; if(Player[playerid][admin] < 1) return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command"); if(sscanf(params,"us",warnID, Reason))return SendClientMessage(playerid, COLOR_RED, "/warn [playerid] [reason]"); if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!"); if(Player[player1][admin]) return SendClientMessage(playerid,COLOR_RED,"You can`t WARN yourself"); if(Player[playerid][admin] < Player[playerid][admin]) return SendClientMessage(playerid,COLOR_RED,"You can`t WARN a high ranked admin"); else { new wString[256], wString2[256], wString3[256], Name[MAX_PLAYER_NAME]; SetPVarInt(warnID, "PlayerWarnings", GetPVarInt(playerid, "PlayerWarnings")+1); if(GetPVarInt(playerid, "PlayerWarnings")>=1) GetPlayerName(playerid, Name,sizeof(Reason)); format(wString, sizeof(wString), "**(ADMIN WARN)*** %s(%d) %s Read /Rules",Name, warnID, Reason); format(wString2, sizeof(wString2), "%s(%d) (Has Been Forced To Read Rules)",Name, warnID); format(wString3, sizeof(wString3), "You Have Been WARNED By Admin For: %s",Reason); SendClientMessageToAll(COLOR_RED, wString); SendClientMessageToAll(COLOR_RED, wString2); SendClientMessage(warnID, COLOR_RED, wString3); if(GetPVarInt(playerid, "PlayerWarnings")>=3)Kick(warnID); } return 1; }