Need help with points and money
#1

Guys, I started to make a [FS] which gives you points and money when you drift. I was wondering how can I make it so when you make a longer drift it gives more points and money.

I have another question too. Where is my error? I deleted everything from the file and started building it again. Is this the problem?
Quote:

D:\Games\GTA San Andreas\MyServer\filterscripts\BaFTa`s [FS].pwn(17) : error 021: symbol already defined: "GetPlayerFacingAngle"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

pawn Код:
#include <a_samp>

#define COLOR_RED 0xCC0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PINK 0xFFC0CBAA

public OnPlayerCommandText (playerid, cmdtext[])

if (strcmp(cmdtext, "/drift", true) == 0)

GetPlayerVehicleID(playerid);
GetPlayerFacingAngle(playerid, Float:20);
SetPlayerScore(playerid, 1);
GivePlayerMoney(playerid, 200);
I tryed with "else" but it didn`t work again. I`m a new scripter..
Reply
#2

You have to use bracets

pawn Код:
#include <a_samp>

#define COLOR_RED 0xCC0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PINK 0xFFC0CBAA

public OnPlayerCommandText (playerid, cmdtext[])
{
if (strcmp(cmdtext, "/drift", true) == 0)
{
GetPlayerVehicleID(playerid);
GetPlayerFacingAngle(playerid, Float:20);
SetPlayerScore(playerid, 1);
GivePlayerMoney(playerid, 200);
}
return 1;
}
Important note: I did not indent the code, please use the search button if you don't know what indentation is
Reply
#3

Here what it gives me now
Quote:

D:\Games\GTA San Andreas\MyServer\filterscripts\BaFTa`s [FS].pwn(17) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Error.

Reply
#4

Sorry I didn't see that

The Float: means that the parameter has to be a float wich is a number like this: 0.0

So replace Float:20 with 20.0
Reply
#5

I did it and it gives me the same error again ;(
I`ve made one-two scripts and in each of them the Float: isn`t replaced. They work
Reply
#6

Oh xp
Fail

Use SetPlayerFacingAngle
GetPlayerFacingAngle is to get the angle as it says
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)