SA-MP Forums Archive
Thief job - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Thief job (/showthread.php?tid=321803)



Thief job - livests - 28.02.2012

Hy i want to make thief job but i dont cnow how to make that i start mision and spawn car in chekpoint.
Example i tipe /work and get random lokation(go steal sentinel in werdant meadows) and sentinel spawn at that location and then im there i need just get in and drive to unlody and in that location my car disapear


Re: Thief job - Roperr - 28.02.2012

This is kind of a request which should go in the request section.


Re: Thief job - livests - 28.02.2012

hmm i think if i request script then i shud request whole script not 1% of it


Re: Thief job - Roperr - 28.02.2012

Well if someone makes that for you, it can give you an idea how to do those things further and advance it...


Re: Thief job - livests - 28.02.2012

ok i make that i steal car that is already placed but how to destroy it but only thief car
public OnPlayerEnterRaceCheckpoint(playerid,TEAM_THIEF)
{
DestroyVehicle(GetVehicleModel(GetPlayerVehicleID( playerid)));
return 1;
}


Re: Thief job - Walsh - 28.02.2012

Quote:
Originally Posted by livests
Посмотреть сообщение
ok i make that i steal car that is already placed but how to destroy it but only thief car
public OnPlayerEnterRaceCheckpoint(playerid,TEAM_THIEF)
{
DestroyVehicle(GetVehicleModel(GetPlayerVehicleID( playerid)));
return 1;
}
You wouldn't use
pawn Код:
GetVehicleModelID
because that is to determine, well the model id! You should use
pawn Код:
GetPlayerVehicleID
because you want to get the car that the player is in.
So it should be like this.
pawn Код:
DestroyVehicle(GetPlayerVehicleID(playerid));



Re: Thief job - livests - 29.02.2012

but if i work as trucker and drive in ckepoint my car destroys?


Re: Thief job - Walsh - 29.02.2012

Add another if statement to check if the player is a Thief.