Problem regarding CreateObject - 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: Problem regarding CreateObject (
/showthread.php?tid=545944)
Problem regarding CreateObject -
Somalez - 11.11.2014
Hello there, My name is Alexander and I'm in need of help.
A'ight , I'll get to the problem. Currently, I scripted a server (DM) and in /freeroam I want to add maps(CreateObject) , but if i add them after OnPlayerConnect I don't know why , but the objects (IG) duplicates. By this I mean that If i restart server several times the objects are getting duplicated (GMX / CLOSE - CONSOLE). I don't know what to do since I've tried a lot of things.
Re: Problem regarding CreateObject -
LeXuZ - 11.11.2014
If its on playerconnect it means the objects will load every time someone joins, put it on
Код:
public OnGameModeInit()
or
Код:
public OnFilterScriptInit()
if it's a FilterScript so it does not duplicate
Re: Problem regarding CreateObject -
Somalez - 12.11.2014
I added it at OnGameModeInit , but not it says undefined C:\Users\Valentin$\Desktop\Server - Real one\Server - Real one\EMRP 0.3z\gamemodes\lvrp.pwn(11674) : error 017: undefined symbol "playerid" . I think it comes from RemoveBuildingForPlayer and it is necessary
Re: Problem regarding CreateObject -
xWarrior - 12.11.2014
put RemoveBuildingForPlayer under public OnPlayerConnect(playerid) and objects under public OnGameModeInit() [for gamemode] or public OnFilterScriptInit() [for filterscript]
Re: Problem regarding CreateObject -
Somalez - 12.11.2014
It works now, Thank you for the support.