13.03.2011, 11:04
Hey guys i have made this cmd with an toturial help... It was to make a setcash cmd but i made a /stun one
It work well and show the mensagem to cop and to susect but, to the cop show too a UNCKNOWN COMMAND sentence...
It stun even with this mensage but i want to remove it....
When i compile it show me a warmning too saying this cmd should return a value...
Here's the code:
THANKS
It work well and show the mensagem to cop and to susect but, to the cop show too a UNCKNOWN COMMAND sentence...
It stun even with this mensage but i want to remove it....
When i compile it show me a warmning too saying this cmd should return a value...
Here's the code:
pawn Код:
COMMAND:stun(playerid, params[])
{
if(GetPlayerColor(playerid) == 0x0259EAAA)
{
new toplayer;
if(!sscanf(params, "ui", toplayer))
{
if(IsPlayerConnected(toplayer))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(toplayer, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Cop %s Has Stun You", name);
SendClientMessage(playerid, 0x0259EAAA, string);
format(string, sizeof(string), "You Has Stun %s", PlayerName);
SendClientMessage(playerid, 0x0259EAAA, string);
TogglePlayerControllable(playerid, 0);
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player Is Not Conected.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /stun [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Only Cops Can Use This Command.");
}