if(strcmp(cmdtext, "/passin", true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid, 15, -227.0744,996.9635,19.5682)) // Police enterance { SetPlayerPos(playerid, 2257.3301,2498.6348,1.7257); // these are coordinates where he'll spawn (PD INT) return 1; } return 1; }
Okay mates. I kinda did this command but i am not able to make it that when some one types /passin and he is in a vehicle he will get teleported with the vehicle cause when some one is in the vehicle the car stays where the entrance is and he gets teleported inside.
Код:
if(strcmp(cmdtext, "/passin", true, 6) == 0) { if(IsPlayerInRangeOfPoint(playerid, 15, -227.0744,996.9635,19.5682)) // Police enterance { SetPlayerPos(playerid, 2257.3301,2498.6348,1.7257); // these are coordinates where he'll spawn (PD INT) return 1; } return 1; } |
if(strcmp(cmdtext, "/passin", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 15, -227.0744,996.9635,19.5682)) // Police enterance
{
if(IsPlayerInAnyVehicle(playerid))
{
RemovePlayerFromVehicle(playerid);
}
SetPlayerPos(playerid, 2257.3301,2498.6348,1.7257); // these are coordinates where he'll spawn (PD INT)
return 1;
}
return 1;
}
SetVehiclePos(GetPlayerVehicleID(playerid), 2257.3301,2498.6348,1.7257);
if(strcmp(cmdtext, "/passin", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 15, -227.0744,996.9635,19.5682)) // Police enterance
{
new vid = GetPlayerVehicleID(playerid)
if(vid != 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2257.3301,2498.6348,1.7257);
}
SetPlayerPos(playerid, 2257.3301,2498.6348,1.7257); // these are coordinates where he'll spawn (PD INT)
}
return 1;
}