07.02.2011, 13:59
this command is all work not errors what i need to add something for exampel
/freeze 1 dm
now he got freeze
Admin blalba freezed balblala for Reason: dm
now i need when i freeze the same id while he is freezed tell
balba is already freezed
please help guys!
/freeze 1 dm
now he got freeze
Admin blalba freezed balblala for Reason: dm
now i need when i freeze the same id while he is freezed tell
balba is already freezed
please help guys!
Код:
dcmd_freeze(playerid,params[]){
new
Reason[128],
pID;
if(Player[playerid][admin] < 1){
return 0;
}
if(sscanf(params,"us",pID,Reason)){
return SendClientMessage(playerid,COLOR_GREY,"|| Usage: /freeze [playerid] [reason] ||");
}
if(!IsPlayerConnected(pID)){
return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
}
if(pID == playerid){
return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE yourself");
}
if(Player[playerid][admin] < Player[pID][admin]){
return SendClientMessage(playerid,COLOR_RED,"You can`t FREEZE a high ranked admin");
}
new string[128], string3[128], string4[128], str[128], name[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
GetPlayerName(pID,name,sizeof(name));
GetPlayerName(playerid, aname, sizeof(aname));
format(string,sizeof(string),"**(ADMIN FREEZE)** %s(%d) %s",name,pID,Reason);
format(string3,sizeof(string3),"You Have Been FORZEN By Admin For: %s",Reason);
format(string4,sizeof(string4),"You Have FREEZE %s(%d) For Reason %s",name, pID, Reason);
format(str,sizeof(str), "Admin %s(%d) Has FREEZED %s(%d) For Reason: %s",aname,playerid,name,pID,Reason);
SendClientMessageToAll(gold,string);
SendClientMessage(pID, f,string3);
SendClientMessage(playerid, COLOR_GREEN,string4);
SendAdminMessage(COLOR_YELLOW, str);
TogglePlayerControllable(pID, 0);
SaveToFile("Freeze", str);
return 1;
}

