Checkpoint set problem
#1

if(TakingLesson[playerid] == 1) { }
else {
SetPlayerCheckpoint(playerid, 1219.0502,-1812.7823,16.5938,5.0);
SendClientMessage(playerid,COLOR_YELLOW, "A checkpoint has been set to the driving school.");
SendClientMessage(playerid,COLOR_GREY, "You don't have a driving license.");
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SetTimerEx("UnFreezeStation", 500, 0, "i", playerid);


why this doesn't set a checkpoint to the DMV and return the message to the player after pressing F to a car without driving license?

****
Reply
#2

where is this code placed?
Reply
#3

what do you use TakingLesson for?
Reply
#4

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
where is this code placed?
public OnPlayerStateChange(playerid, newstate, oldstate)
Reply
#5

well I dont understand what u need help with but, I think this code is badly-writed
PHP код:
if(TakingLesson[playerid] == 1)
{
    
SetPlayerCheckpoint(playerid1219.0502,-1812.7823,16.5938,5.0);
    
SendClientMessage(playerid,COLOR_YELLOW"A checkpoint has been set to the driving school.");
}
else
{
    
SendClientMessage(playerid,COLOR_GREY"You don't have a driving license.");
    
RemovePlayerFromVehicle(playerid);
    
TogglePlayerControllable(playerid1);
    
SetTimerEx("UnFreezeStation"5000"i"playerid);

I think this must be your code.
Reply
#6

https://pastebin.com/1zAykfh1
Line 11826 is giving a error, that line is: (D:\server\gamemodes\ExtremeGame.pwn(11826) : error 029: invalid expression, assumed zero
)
Код:
 	else
I need help with this, let me explain what. When a player without a driving license press F to a car, it will show up the message "You don't have a driving license." and set a checkpoint for the respective player to the DMV, showing up the message ""A checkpoint has been set to the driving school."
Reply
#7

Fixed the error which i showed up there, but it still doesn't work.
It does not set a checkpoint to the DMV and doesn't return the message with "A checkpoint has been set.."
Reply
#8

show me how you use
PHP код:
TakingLesson[playerid
Reply
#9

if(TakingLesson[playerid] == 1)
{
PlayerTextDrawHide(playerid, DMVexam[playerid]);
PlayerTextDrawHide(playerid, DMVcheck[playerid]);
DestroyVehicle(examcar[playerid]);
DisableRemoteVehicleCollisions(playerid, 0);
examcar[playerid] = -1;
TakingLesson[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
}

I noticed the location where I edited bugged /exam. The checkpoint and the message is showing only when typing /exam, it get me out from the car.. i don't know where i should edit for doing what i said up there
Reply
#10

Okay so, show me the whole code now, tell me what do you want to do using it, tell me the current bug please, So I can fix this for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)