Velocity help?
#1

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

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!
Reply
#3

So at the end how would it the script look like can you post a pwn code or something?
Reply
#4

As I said - it depends on what you want to do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)