SA-MP Forums Archive
Object player problem, 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: Object player problem, help! (/showthread.php?tid=459682)



Object player problem, help! - usersamp - 24.08.2013

where is the bug in this script? i need create player object (visible to all server, not CreatePlayerObject), but when a player (random) disconnected of the server, the object bug to all players... the script example is this, please help me where i wrong

Create a Variable
new ObjectPlayer[MAX_PLAYERS];

OnPlayerSpawn
// I create a Object
ObjectPlayer[playerid] = CreateObject( ...

OnPlayerDisconnect
DestroyObject(ObjectPlayer[playerid]);

// I try to use also IsValidObject, but nothing the Object ID bug for all Players!
// Thanks in advance!


Re: Object player problem, help! - PT - 24.08.2013

look this better

https://sampwiki.blast.hk/wiki/AttachObjectToPlayer