SA-MP Forums Archive
Loading cars on island - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Loading cars on island (/showthread.php?tid=368957)



Loading cars on island - jeremy8810 - 15.08.2012

Hi guys,

Im sitting with a problem over here. I spawn some cars at an island I made by myself. When people spawn there all the trucks ar spawned underneath the ground...

I think I need this but dont know how to make: You respawn, you wat 3 secs to load the objects, then you can move. I think that is to fix the prob?

I dont know how to make it and if it is right^?

Leave your comment's how to resolve this...

Thanks

Jer


Re: Loading cars on island - L.Hudson - 15.08.2012

Make a timer for freezing the player

I will make a simple one for you.

under Main() { }

pawn Код:
forward Timer(playerid);
public Timer(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}

public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, -1, "You are frozen for 5 seconds to load objects.");
SetTimerEx("Timer",5000/*5 seconds in milliseconds*/, false/*no repeating of the timer*/, "i", playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}



Re: Loading cars on island - [DOG]irinel1996 - 15.08.2012

Quote:
Originally Posted by L.Hudson
Посмотреть сообщение
Make a timer for freezing the player

I will make a simple one for you.

under Main() { }

pawn Код:
forward Timer(playerid);
public Timer(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}

public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, -1, "You are frozen for 5 seconds to load objects.");
SetTimerEx("Timer",5000/*5 seconds in milliseconds*/, false/*no repeating of the timer*/, "i", playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
That won't fix the problem, because the vehicles will go underground with your code too. It just freezes the player to give loading time to the objetcs, the result? Player won't fall underground, but vehicles yes.
_________________________
Now, I think there isn't any fix for that. To "freeze" the vehicles, that happened to me too in my free roam.


Re: Loading cars on island - L.Hudson - 15.08.2012

I missread, I thought it wanted just the player


Re: Loading cars on island - jeremy8810 - 15.08.2012

So how to fix this prob?

EDIT: the problem is not fixed with your script you gave L.Hudson


Re: Loading cars on island - jeremy8810 - 15.08.2012

Anyone who can help me with this problem? Cause I need to fix it...


Re: Loading cars on island - doreto - 15.08.2012

Did you try to lift the vehicle cor becose as i see vehicles are stuck on map


Re: Loading cars on island - JaKe Elite - 15.08.2012

Well when i mapping an island or something like that with vehicle.
I always put them on 10 feet high (i don't know) then i freeze players.
So when the vehicle land on the ground it won't stuck under on it.

Well hope it works (or maybe not?) this is crazy little trick.


Re: Loading cars on island - jeremy8810 - 15.08.2012

Well I put the vehicles a bit higher on the air, so maybe I have to put them some more higher, going to try it, thanks


Re: Loading cars on island - JaKe Elite - 15.08.2012

Thank you for trying my crazy little trick lol.