SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Dont leave vehicle (https://forum.sa-mp.com/showthread.php?t=401845)

NicholasA 24/12/2012 10:26 AM

Dont leave vehicle
 
Hey guys i got this command that lets you deliver stuff to a cp but on your way when you leave your vehicle the cp will get removed, how do i do this?
pawn Code:
COMMAND:startmech(playerid, params[]) // work at mechanic and receive $180
{
  if(!IsPlayerInRangeOfPoint(playerid, 30.0,2451.0056,-2118.1301,13.5469))return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic]You are not at the mechanic HQ! ))");
  if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 525) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You are not in a mechanics vehicle! ))");
  SendClientMessage(playerid, 0x3524C9FF, "(( [Mechanic] Deliver the tires to the checkpoint and receive your paycheck! ))");
  SetPlayerCheckpoint(playerid, 848.1696,-1445.7803,13.5762, 5.0);
  return 1;
}

=WoR=Varth 24/12/2012 10:59 AM

Re: Dont leave vehicle
 
http://wiki.sa-mp.com/wiki/OnPlayerExitVehicle
http://wiki.sa-mp.com/wiki/DisablePlayerCheckpoint

DaRk_RaiN 24/12/2012 11:08 AM

Re: Dont leave vehicle
 
RemovePlayerFromVehicle(playerid);


All times are GMT. The time now is 11:07 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.