Vehicle checking
#1

OnPlayerEnterCheckpoint
Код:
            case 35:
            {
            	if(IsPlayerInCheckpointEx(playerid, cpid))
                {
                	if(IsPlayerInVehicle(playerid, 440)) // if vehicle == 440
    				{
				        SetTimerEx("kraunamgps", 7000, false, "i", playerid);
				        TogglePlayerControllable(playerid,false);
				        SendClientMessage(playerid,-1,"{FFC400}»{949494} Praљome palaukti, kraumi GPS'ai.");
				    }
				    else // if vehicle not 440
				    {
				    	SendClientMessage(playerid,-1,"{FFC400}»{949494} walink");
				    }
                }	
            }
The problem is that i'm sitting in 440 vehicle, but I dont get the TimerEx ant TogglePlayerControllble. Maybe someone knows the problem?
Reply
#2

The thing that concerns me is that "case". What did you put in the "switch"? As far as I know OnPlayerEnterCheckpoint does not have any other parameters than "playerid'.

By the way, every time that something is not working, put "printf("%s", name-of-the-function); and run the script. It's a simple way of debugging and checking where the scripts fails to work.
Reply
#3

SendClientMessage(playerid,-1,"{FFC400}»{949494} walink");

I'm getting only this message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)