How To Make
#1

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

Reply
#2

Check other driving schools scripts, there's a lot.
Reply
#3

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!
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)