13.06.2010, 13:31
ok i try to add velocity and well it has to functions: 1 a boost and 2 a jump.
the jump works and the boost doesnt this is what i get when compile:
and all i have in the filterscript is:
Please help me get boost working thx
Sry for double topic internet screwed up that time
Anyone??
the jump works and the boost doesnt this is what i get when compile:
Код:
C:\Documents and Settings\Abraham2\My Documents\SAMP SERVERS\ser 0.3\filterscripts\Velocity.pwn(41) : warning 217: loose indentation C:\Documents and Settings\Abraham2\My Documents\SAMP SERVERS\ser 0.3\filterscripts\Velocity.pwn(46) : warning 203: symbol is never used: "OnPlayerUpdate" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
Код:
#include <a_samp> #define PRESSED(%0) \ (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) new Tick[MAX_PLAYERS]; OnPlayerUpdate(playerid) { Tick[playerid]++; if(Tick[playerid] != 3) return 1; Tick[playerid] = 0; new Keys,up,down; GetPlayerKeys(playerid,Keys,up,down); new Float:x,Float:y,Float:z; if(Keys &= 1024) { if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { GetPlayerVelocity(playerid,x,y,z); SetPlayerVelocity(playerid,x*1.2,y*1.2,z*1.2); } } else if(Keys &= 4) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z); SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2); } } return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys { new Float:x, Float:y, Float:z; GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z); SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3); } return 1; }
Sry for double topic internet screwed up that time
Anyone??