14.07.2011, 18:07
Hmmm, I'm trying to make it so players cant score farm, using GetPlayerSpeed, this is only basic becuse it will be replaced with a /work system, but can you guys help me?
I am using this stock.
So, I tried a couple of things in the score system.
And this
But I keep getting theese errors
Any ideas?
I am using this stock.
pawn Код:
stock GetPlayerSpeed(playerid,bool:kmh) // by misco
{
new Float:Vx,Float:Vy,Float:Vz,Float:rtn;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz);
rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100);
}
pawn Код:
forward ScoreSystem( );
public ScoreSystem( )
{
foreach(Player,i)
{
if(IsPlayerInPlane(i) && GetPlayerSpeed(i, > 50))
{
GivePlayerMoney(i,2000);
SetPlayerScore(i,GetPlayerScore(i) + 1);
SendClientMessage(i, COLOR_RED, "One flying minute. 1 Score + 2k cash.");
}
}
pawn Код:
forward ScoreSystem( );
public ScoreSystem( )
{
foreach(Player,i)
{
if(IsPlayerInPlane(i) && GetPlayerSpeed(i, = > 50))
{
GivePlayerMoney(i,2000);
SetPlayerScore(i,GetPlayerScore(i) + 1);
SendClientMessage(i, COLOR_RED, "One flying minute. 1 Score + 2k cash.");
}
}
}
Код:
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : error 029: invalid expression, assumed zero C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : warning 215: expression has no effect C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : error 029: invalid expression, assumed zero C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
C:\Documents and Settings\Ed\My Documents\SA-MP Virtual Pilots\Server\filterscripts\AircraftSystems.pwn(244) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.