Problem regarding CreateObject
#1

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.
Reply
#2

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
Reply
#3

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
Reply
#4

put RemoveBuildingForPlayer under public OnPlayerConnect(playerid) and objects under public OnGameModeInit() [for gamemode] or public OnFilterScriptInit() [for filterscript]
Reply
#5

It works now, Thank you for the support.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)