CheckATC Code Issue
#1

Hmm....

So I have this ATC system Im making and It seems to not want to work. The only part that I don't have working is the vid part.

I defined vid as:
pawn Код:
vid = GetPlayerVehicleID(playerid);
Heres My Code Obviously with the forward:

pawn Код:
public CheckATC(playerid,newstate)
{
new vid = GetPlayerVehicleID(playerid);
if(ATCAllow[playerid] == 0 || newstate == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(playerid,0);
}
if(ATCAllow[playerid] == 1 && newstate == PLAYER_STATE_DRIVER)
{
TogglePlayerControllable(playerid,1);
}
}
Reply
#2

use onplayerstatechange
Reply
#3

I do not know what ATC means, so if you could explain what you are trying to do, that would be great.

And since you are checking the state of the player, it would be smarter to use OnPlayerStateChange, as suggested by The_Gangstas. (Only one person :P)
Reply
#4

Quote:
Originally Posted by Grim_
Посмотреть сообщение
I do not know what ATC means, so if you could explain what you are trying to do, that would be great.

And since you are checking the state of the player, it would be smarter to use OnPlayerStateChange, as suggested by The_Gangstas. (Only one person :P)
ATC = air traffic control
Reply
#5

Basiclly. This peice of code checks if the player has ATC clearence. Under OnPlayerStateChange it checks if the player has clearence and sends a message this codes checks to see if they have clearence then freezes them of unfreezes them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)