Posts: 937
Threads: 69
Joined: Dec 2009
Reputation:
0
22.09.2010, 20:46
(
Последний раз редактировалось Cypress; 04.11.2010 в 12:41.
)
Hello guys.
I want to do a piss command so when i'm near a player and i type /piss, in the chatbox will say * player pissed on player.
Tnx )
Posts: 937
Threads: 69
Joined: Dec 2009
Reputation:
0
BTW cameltoe where is the pissing animation, and what is break; ? can u make it with return 1;?
Posts: 1,741
Threads: 44
Joined: Apr 2010
Reputation:
0
break is to stop the for loop if you want to return 1; do that after the whole for loop.
Im not into anims so i dont know the anim, i guess if you search you can find an anim fs and look through them.
Posts: 195
Threads: 16
Joined: Aug 2009
Reputation:
0
As RetardedWolf already said it's IsPlayerInRangeOfPoint.
But you also need to make ; in the end of the if statement to ). (if statement gives error if ; is put)
And also you need to break; the loop or it will say you pissed on all people close to you.
As a last note, the string you have made is much longer than neccesary. It only needs 52 cells
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
This is what happens when people do not know how to script. They rely on other people to make everything for them, being lazy. The best thing to do is read the SA-MP Wiki and also visit some of the stickied threads around this forum. I know ******* has some basic scripting tutorials, so you should check that out as well.
Posts: 246
Threads: 13
Joined: Aug 2010
Reputation:
0
Why using IsPlayeInRange while IsPlayerInRangeOfPoint, there is like 7 characters difference.. plus its standard so less lagg.. And it might be slower
Posts: 1,741
Threads: 44
Joined: Apr 2010
Reputation:
0
Cause with IsPlayerInRange you can use Radius and z radius..
Posts: 937
Threads: 69
Joined: Dec 2009
Reputation:
0
This looks like an old topic but my problem is not solved yet.
So when i type /piss it says 'You pisses on you', so as i see i'm pissing on my self. I need so if someone will type /piss and no one will be near it wont say nothing, it will only show me the animation.