How To Make - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How To Make (
/showthread.php?tid=89326)
How To Make -
Geekzor - 01.08.2009
how i can make if player sit in this cars:
this
AddStaticVehicle(405,-2064.1790,-84.9177,35.0391,1.1960,75,1); // 1 1
this
AddStaticVehicle(405,-2068.6277,-85.3434,35.0391,2.0065,123,1); // 1 1
or this
AddStaticVehicle(405,-2072.9028,-85.2128,35.0391,0.2303,11,1); // 1 1
there create a checkpoint...- i am making this for car driving school
ty for any help
Re: How To Make -
MenaceX^ - 01.08.2009
Check other driving schools scripts, there's a lot.
Re: How To Make -
Criss_Angel - 01.08.2009
Quote:
Originally Posted by Geekzor
how i can make if player sit in this cars:
this
AddStaticVehicle(405,-2064.1790,-84.9177,35.0391,1.1960,75,1); // 1 1
this
AddStaticVehicle(405,-2068.6277,-85.3434,35.0391,2.0065,123,1); // 1 1
or this
AddStaticVehicle(405,-2072.9028,-85.2128,35.0391,0.2303,11,1); // 1 1
there create a checkpoint...- i am making this for car driving school
ty for any help
|
Top of Script:
pawn Код:
new Testcar1;
new Testcar2;
new testcar3;
then OnGameModeInit
pawn Код:
Testcar1 = AddStaticVehicle(405,-2064.1790,-84.9177,35.0391,1.1960,75,1); // 1 1
Testcar2 = AddStaticVehicle(405,-2068.6277,-85.3434,35.0391,2.0065,123,1); // 1 1
Testcar3 = AddStaticVehicle(405,-2072.9028,-85.2128,35.0391,0.2303,11,1); // 1 1
Then OnPlayerEnterVehicle:
pawn Код:
If(GetPlayerVehicleID) == Testcar1 || Testcar2 || Testcar3||
{
SetCheckpointForPlayer(Checkpointid == ur checkpoint);
}
you have to make the checckpoints aswell!
Re: How To Make -
refshal - 01.08.2009
Quote:
Originally Posted by Criss_Angel
pawn Код:
If(GetPlayerVehicleID) == Testcar1 || Testcar2 || Testcar3|| { SetCheckpointForPlayer(Checkpointid == ur checkpoint); }
you have to make the checckpoints aswell!
|
That wouldn't work. Because you can't close with "||", "If(GetPlayerVehicleID)" is an invalid function, "if" has to start with a non-capital letter, and "SetCheckpointForPlayer" is an invalid function too. But this should work:
pawn Код:
if(GetPlayerVehicleID(playerid) == Testcar1 || Testcar2 || Testcar3)
{
SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size);
return 1;
}