whats wrong with that command??
#1

hey guys, i made a command for a player that is in medics team here it is:

if(!strcmp(cmd,"/heal",true))
{
if(GetPlayerTeam(playerid) == 3)
{
new id;
SetPlayerHealth(id, 100.0);
// ClearAnimations(playerid);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
return true;
}

It only heal's if you are id 0 and it will only heal you not the other player.

and another command for cops:

if(!strcmp(cmd,"/cuff",true))
{
if(GetPlayerTeam(playerid) == 1)
{
new id;
TogglePlayerControllable(id,0);
GameTextForPlayer(giveplayerid, "~y~ You have been Cuffed!",2500,3);
}
return true;
}

if(!strcmp(cmd,"/uncuff",true))
{
if(GetPlayerTeam(playerid) == 1)
{
new id;
TogglePlayerControllable(id,1);
GameTextForPlayer(giveplayerid, "~y~ You have been Uncuffed!",2500,3);
}
return true;
}

same with that, only cuff if you are is 0 and will only cuff you..

please help me fix that, thanks.
Reply


Messages In This Thread
whats wrong with that command?? - by audifan00 - 12.10.2010, 18:28
Re: whats wrong with that command?? - by [HiC]TheKiller - 12.10.2010, 18:59
Re: whats wrong with that command?? - by cca - 12.10.2010, 19:09
Re: whats wrong with that command?? - by boelie - 12.10.2010, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)