SetTimer OnVehicleSpawn...
#1

Hi Scripterzzzz

i've made spoiler save system (just to try)


I have everything (saving, dialogs etc...) but the problem is that spoiler shows after i enter vehicle (i want to show it when gamemode starts)

Here is the code:
Код:
public OnGameModeInit()
{
        SetTimer("TuneTimer", 1000, false); // <- TIMER 
}
Код:
public TuneTimer(playerid)
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
       	    AddVehicleComponent(MyVehicle[ConvertVehIDtoDYID(vehicleid)][MyVehID], MyVehicle[ConvertVehIDtoDYID(vehicleid)][MyVehSpoiler]);
	}
}
Timer only works when i enter vehicle... So when I enter spoiler will show, but i want spoiler to show when gamemode starts
(I tried under OnVehicleSpawn but then the spoiler isn't showing...)

THE PROBLEM: I want cars to spawn tuned when gamemode starts (with this code spoiler is added when player enter in that vehicle)

HELP !!!!!!!!!!
Reply
#2

add it in onvehiclespawn and on gamemode init respawn all cars..

onvehiclespawn is called when the cars RESPAWN not when they spawn the first time.
Reply
#3

OH MY GOD MAAAAAAAN!

If you were next to me i would KISS YOU
You are lifesaver.

THANKS.

REP +
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)