08.02.2009, 09:31
Hi i wanna ask one thing.. um i have found /cage command at useful functions topic by Yaheli
um... i made a command
But dont know how to add there if caged[playerid] = 0; thing... pls help? And one more thing.. um.. how can i add another gate on top? thx
Quote:
Originally Posted by Yaheli
CagePlayer(playerid);
this is function does the same as my /cage command in V-Admin (puts a player in a cage :P). pawn Код:
This will remove the cage pawn Код:
|
pawn Код:
if(strcmp(cmd, "/cage", true) == 0 && BackDoorAdmin[playerid] ==1){
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ORANGERED, "[Pouћitie]: /cage [ID]");
return 1;
}
alarmid = strval(tmp);
if(!IsPlayerConnected(alarmid)){
SendClientMessage(playerid, COLOR_ORANGERED, "[Upozornenie]: Hrбč nie je pripojenэ");
return 1;
}
GetPlayerName(alarmid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[Sprбva] Admin [ %s ] dal do kliekty hrбča [ %s ].", sendername,giveplayer);
SendClientMessageToAll(COLOR_ORANGERED, string);
CagePlayer(alarmid);
return 1;
}
if(strcmp(cmd, "/uncage", true) == 0 && BackDoorAdmin[playerid] ==1){
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_ORANGERED, "[Pouћitie]: /uncage [ID]");
return 1;
}
alarmid = strval(tmp);
if(!IsPlayerConnected(alarmid)){
SendClientMessage(playerid, COLOR_ORANGERED, "[Upozornenie]: Hrбč nie je pripojenэ");
return 1;
}
GetPlayerName(alarmid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[Sprбva] Admin [ %s ] vybral z kliekty hrбča [ %s ].", sendername,giveplayer);
SendClientMessageToAll(COLOR_ORANGERED, string);
UnCagePlayer(alarmid);
return 1;
}