12.10.2010, 18:28
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.
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.