SA-MP Forums Archive
Turf right placed code.... [Help] - 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: Turf right placed code.... [Help] (/showthread.php?tid=531413)



Turf right placed code.... [Help] - Sting. - 12.08.2014

Alright first of all let me say I have no problems, with the turfs I have. Its just that I believed I put them in the wrong position like before, when I put it at OnPlayerConnect, every time I disconnected and rejoined (didn't close sa-mp.exe), the turf become darker, because it re-creates it when a player connects right? So big mistake. This time I put it at "OnPlayerSpawn". Alright no problems when I compile but I know something is not right. Alright, on top of the script as usual new GZ_Zone1. Then I create it in GameModeInIt as usual. Now this is what the code is under OnPlayerSpawn, "GangZoneShowForAll(GZ_ZONE1, 0xFFFF0096);" ? Is it correct or is it gangzoneshowforplayer? I'm confused....


Re: Turf right placed code.... [Help] - Faisal_khan - 12.08.2014

GangZoneShowForAll is being called for everyone(a global function). So when a player spawns, the area will become darker. Use GangZoneShowForPlayer.


Re: Turf right placed code.... [Help] - 0x123456789 - 12.08.2014

Can you give the full script ?


Re: Turf right placed code.... [Help] - Sting. - 13.08.2014

Alright Faisal, but what about this.... If I set to to ShowForPlayer, won't it be that every time he dies and then respawn won't the turf become darker too especially for that guy or must I destroy the turf when he dies, then it will recreate when he spawns?


Re: Turf right placed code.... [Help] - Sting. - 13.08.2014

Alright thanks Southclaw.