playerid OnObjectMoved - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: playerid OnObjectMoved (
/showthread.php?tid=209923)
playerid OnObjectMoved -
zofa - 11.01.2011
Hello is there any way to make this working?
Код:
new Nuke[MAX_PLAYERS];//variable for any player
public OnObjectMoved(objectid)
{
if(objectid==Nuke[playerid)
{
//do something
}
return 1;
}
But as it should be i getting this error:
Код:
error 017: undefined symbol "playerid"
Now, is there any way to use playerid in this callback?
Thanks
AW: playerid OnObjectMoved -
Kmitska - 11.01.2011
Try this:
new Nuke[MAX_PLAYERS];
public OnObjectMoved(objectid)
{
for(new i; i<MAX_PLAYERS; i++)
if(objectid==Nuke[i])
{
//do something
}
return 1;
}
Re: playerid OnObjectMoved -
Iuri - 11.01.2011
Quote:
Originally Posted by zofa
Hello is there any way to make this working?
Код:
new Nuke[MAX_PLAYERS];//variable for any player
public OnObjectMoved(objectid)
{
if(objectid==Nuke[playerid)
{
//do something
}
return 1;
}
But as it should be i getting this error:
Код:
error 017: undefined symbol "playerid"
Now, is there any way to use playerid in this callback?
Thanks
|
So basicly you want to compare a player's id with an moved object's id?
Re: AW: playerid OnObjectMoved -
zofa - 11.01.2011
Quote:
Originally Posted by Kmitska
Try this:
new Nuke[MAX_PLAYERS];
public OnObjectMoved(objectid)
{
for(new i; i<MAX_PLAYERS; i++)
if(objectid==Nuke[i])
{
//do something
}
return 1;
}
|
It work, thank you
AW: playerid OnObjectMoved -
Kmitska - 11.01.2011
Iuri, he also did it
Quote:
if(objectid==Nuke[playerid)
|
Re: playerid OnObjectMoved -
Voldemort - 11.01.2011
Use player objs for this
pawn Код:
new Nuke[MAX_PLAYERS];//variable for any player
public OnPlayerObjectMoved(playerid,objectid)
{
if(objectid==Nuke[playerid)
{
//do something
}
return 1;
}