How to check if player is in car
#1

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,

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;
}
Reply


Messages In This Thread
How to check if player is in car - by JoeDaDude - 12.06.2009, 12:30
Re: How to check if player is in car - by wijnkamp - 12.06.2009, 12:40
Re: How to check if player is in car - by JoeDaDude - 12.06.2009, 12:41
Re: How to check if player is in car - by wijnkamp - 12.06.2009, 12:49
Re: How to check if player is in car - by JoeDaDude - 12.06.2009, 12:56
Re: How to check if player is in car - by nickbouwhuis - 20.10.2012, 12:50
Re: How to check if player is in car - by JaKe Elite - 20.10.2012, 13:00
Re: How to check if player is in car - by M3mPHi$_S3 - 20.10.2012, 13:06

Forum Jump:


Users browsing this thread: 2 Guest(s)