SetPlayerAttachedObject+
#1

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

Should be

pawn Код:
new Float:c1x[MAX_PLAYERS];
Reply
#3

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

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

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 );
Reply
#6

Thanks All,works Great:P
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)