Velocity 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: Velocity help? (
/showthread.php?tid=465672)
Velocity help? -
Tomix - 23.09.2013
Hello mates I tried to make this little script with velocity and I was getting some errors I was wondering if you mates would help me out please?
Код:
#include <a_samp>
#define FILTERSCRIPT
PublicOnPlayerConnect(playerid);
{
new pID;
GetPlayerVelocity(pID, <300);
ban(pID);
return 1;
}
error 055: start of function body without function header
error 021: symbol already defined: "GetPlayerVelocity"
error 010: invalid function or declaration
warning 203: symbol is never used: "pID"
Re: Velocity help? -
Konstantinos - 23.09.2013
pawn Код:
PublicOnPlayerConnect(playerid);
It doesn't need a semicolon at the end. Plus I assume you wanted to do:
pawn Код:
public OnPlayerConnect(playerid)
You declare a new variable
pID which is 0. You are trying to get the velocity of the player 0 when someone connects. However, you need to store the velocity somewhere, they are passed by reference.
pawn Код:
// An example:
new
Float: x,
Float: y,
Float: z
;
GetPlayerVelocity( playerid, x, y, z );
And then you ban player with ID 0.
Re-think what you want to do - read what I said and give a try again!
Re: Velocity help? -
Tomix - 23.09.2013
So at the end how would it the script look like can you post a pwn code or something?
Re: Velocity help? -
Konstantinos - 23.09.2013
As I said - it depends on what you want to do.