Attach 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: Attach help (
/showthread.php?tid=408048)
***Deleted*** -
Er@x3r - 16.01.2013
Deleted...
Re: Attach help -
mineralo - 16.01.2013
like
pawn Код:
#define MAX_OBJECT 2
enum pOpt
{
pObject,pOjectID
};
new MyObject[MAX_PLAYERS][MAX_OBJECTS][pOpt];
some codes....
pawn Код:
MyObject[playerid][0][pOject] = CreateObject(MyObject[playerid][0][pOjectID], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0););
AttachObjectToPlayer(MyObject[playerid][0][pOject],playerid,1.5, 0.5, 0.0, 0.0, 1.5, 2);
and when player logout save Object ids just by checking
pawn Код:
if(MyObject[playerid][0][pOjectID] !=0) ... //your codes
Re: Attach help -
Threshold - 16.01.2013
CreateObject returns -1 if the object is invalid or not created, so:
pawn Код:
if(MyObject[playerid][0][pOjectID] != -1)
Re: Attach help -
Er@x3r - 16.01.2013
thanks man
Re: Attach help -
CodyCummings - 16.01.2013
Annnnnnnd deleted.