Code aint working
#1

pawn Код:
if(IsADL(newcar))
{
if (drtest[playerid] != 0)
{
SendClientMessage(playerid, COLOR_RED, " You did not pay to take a test yet! ");
RemovePlayerFromVehicle(playerid);
return 1;
}
SendClientMessage(playerid, COLOR_GREEN, "Driving Instructor: Follow the Red markers and complete the track. Dont damage the car!");
drtest[playerid] = 2;
DLicense(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_DRTEST;
return 1;
}
I dont get errors, it just doesn't work ingame, ideas?
Reply
#2

Try putting an else if set around the test part. Like:

pawn Код:
if(IsADL(newcar))
{
     if (drtest[playerid] != 0)
     {
          SendClientMessage(playerid, COLOR_RED, " You did not pay to take a test yet! ");
          RemovePlayerFromVehicle(playerid);
          return 1;
     }
     else
     {
          SendClientMessage(playerid, COLOR_GREEN, "Driving Instructor: Follow the Red markers and complete the     track. Dont damage the car!");
          drtest[playerid] = 2;
          DLicense(playerid);
          gPlayerCheckpointStatus[playerid] = CHECKPOINT_DRTEST;
          return 1;
     }
}
Reply
#3

@ randomkid: I appreciate you trying to help, but you are only going to give him more errors then solutions.

What do you mean "It's not working"? Is it not removing the player from the vehicle? Details, details, and more details cannot hurt you in any way!
Reply
#4

It doesn't eject them.
Reply
#5

Quote:
Originally Posted by Grim_
Посмотреть сообщение
@ randomkid: I appreciate you trying to help, but you are only going to give him more errors then solutions.
I don't see how that would give errors.

But yes, details help.
Reply
#6

Quote:
Originally Posted by randomkid88
Посмотреть сообщение
I don't see how that would give errors.

But yes, details help.
For a start "else if" should have a condition.
Reply
#7

Quote:
Originally Posted by iggy1
Посмотреть сообщение
For a start "else if" should have a condition.
Touche. I meant for it to be else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)