Random Thing Gets Errors :( Help
#1

Okey guys I love you all but here in script when I made random spawn locations is got errors and I don`t know why Here is code:
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new rand = random(sizeof(RandomSteal));
 	if(gTeam[playerid] == 6)
    (
    new rand = random(sizeof(RandomSteal));
    SetPlayerCheckpoint(playerid, RandomSteal[rand][0], RandomSteal[rand][1], RandomSteal[rand][2], 3.0);
	return 1;
}
The thing is when team dude enters a vehicle I want checkpoint to apear
Reply
#2

use your code at
public OnPlayerStateChange(playerid, newstate, oldstate)
not at public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
Reply
#3

use this
if(newstate == PLAYER_STATE_DRIVER)

and

if(newstate == PLAYER_STATE_PASSENGER)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)