[Help] height
#1

create a mini game that is above the water, what I want is that the fall of track upload it back into his car

my function

pawn Код:
public OnPlayerUpdate(playerid)
{
if(InSumo[playerid] == 1)
{
new Float:pPos[3],RAND = random(sizeof(SUMO_SPAWNS)),RANDCARS = random(sizeof(SUMO_CARS));
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
if (pPos[2] < 10.0)//If this further down the track
{
CreateVehicleEx(playerid, SUMO_CARS[RANDCARS][0], SUMO_SPAWNS[RAND][0], SUMO_SPAWNS[RAND][1], SUMO_SPAWNS[RAND][2], SUMO_SPAWNS[RAND][3]+5, -1, -1);//gives a new car > random
PutPlayerInVehicle(playerid, g_SPAWNED_VEHICLE[playerid], 0);
return 1;
}
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER)//if out of the car
{
CreateVehicleEx(playerid, SUMO_CARS[RANDCARS][0], SUMO_SPAWNS[RAND][0], SUMO_SPAWNS[RAND][1], SUMO_SPAWNS[RAND][2], SUMO_SPAWNS[RAND][3]+5, -1, -1);//gives a new car > random
PutPlayerInVehicle(playerid, g_SPAWNED_VEHICLE[playerid], 0);
}
}
return 1;
}

The problem is that every second is updating, You can not play
Someone help me?
Reply
#2

Use a timer for this purpose, OnPlayerUpdate is not appropriate and not regular as well symmetric!

Also why using RAND & RANDCARS variables for same purpose.

Also you haven't placed the checks correctly.
Reply
#3

Quote:
Originally Posted by Excel™
Посмотреть сообщение
Use a timer for this purpose, OnPlayerUpdate is not appropriate and not regular as well symmetric!

Also why using RAND & RANDCARS variables for same purpose.

Also you haven't placed the checks correctly.

Owww Thanks for your help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)