12.06.2009, 12:30
How do i check to see if the idis in a car,
It already checks to see if the player is connected,
And also sends a usage...
But how to check if the guy who said the command and the guy he is cuffing,
are in a copcar? I know how but its already checking for player connected and sendin a usage,
It already checks to see if the player is connected,
And also sends a usage...
But how to check if the guy who said the command and the guy he is cuffing,
are in a copcar? I know how but its already checking for player connected and sendin a usage,
pawn Code:
new index;
new cmd[20];
cmd = strtok(cmdtext, index);
if (strcmp(cmd, "/cuff", true) == 0)
{
new tmp[20];
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SendClientMessage(id, 0xFFFFFFFFF, "You have been cuffed and cannot move");
TogglePlayerControllable(id,0);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player not found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /cuff [playerid/name]");
}
return 1;
}