SetPlayerAttachedObject+ - 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: SetPlayerAttachedObject+ (
/showthread.php?tid=306327)
SetPlayerAttachedObject+ -
Admigo - 26.12.2011
Heey all,
I want to make a command that if you use the command you attached object will the pos x changed by 1+.
Like This:
Код:
//top of script
new c1x[MAX_PLAYERS]=0.100000;
/change pos x command
SetPlayerAttachedObject( playerid, 1, 18892, 2, c1x[playerid]+1, 0.004999, -0.001000, 270.000000, 0.000000, 270.000000, 1.000000, 1.000000, 1.000000 );
But its not working because i get error tag mismatch:line:new c1x[MAX_PLAYERS]=0.100000;
How can i let it work?
Thanks Admigo
Re: SetPlayerAttachedObject+ -
[HiC]TheKiller - 26.12.2011
Should be
pawn Код:
new Float:c1x[MAX_PLAYERS];
Re: SetPlayerAttachedObject+ -
Admigo - 26.12.2011
Quote:
Originally Posted by [HiC]TheKiller
Should be
pawn Код:
new Float:c1x[MAX_PLAYERS];
|
I need to put it in top of script?
And what about this =0.100000;?
Because i need this or the start pos of the object will not being good.
Re: SetPlayerAttachedObject+ -
Thresholdold - 26.12.2011
Quote:
Originally Posted by admigo
I need to put it in top of script?
And what about this =0.100000;?
Because i need this or the start pos of the object will not being good.
|
If you keep it, it won't do any harm. You don't have to remove it.
Re: SetPlayerAttachedObject+ -
KoczkaHUN - 26.12.2011
Quote:
Originally Posted by admigo
Код:
new c1x[MAX_PLAYERS]=0.100000;
/change pos x command
SetPlayerAttachedObject( playerid, 1, 18892, 2, c1x[playerid]+1, 0.004999, -0.001000, 270.000000, 0.000000, 270.000000, 1.000000, 1.000000, 1.000000 );
|
It should be
pawn Код:
new Float:c1x[MAX_PLAYERS] = { 0.1, ... };
/change pos x command
c1x[playerid] += 0.1;
SetPlayerAttachedObject( playerid, 1, 18892, 2, c1x[playerid], 0.004999, -0.001000, 270.000000, 0.000000, 270.000000, 1.000000, 1.000000, 1.000000 );
Re: SetPlayerAttachedObject+ -
Admigo - 26.12.2011
Thanks All,works Great:P
Re: SetPlayerAttachedObject+ -
Thresholdold - 26.12.2011
Rep is always a nice thing to do
EDIT: This was a joke xD anyone that responds will get -1 Rep (a joke inside a joke post?) and shall never get any more friends