Camera on PPC_TRUCKING
#6

guys i've made that....please tell me if you see any errors...It should work like..if player is a cop and have a weapon(camera) he can use /Radargun ...that freezes him and if any player is going more then 120kph over him he get a star...and this needs to work on more cops...like 10 cops using /radargun and they will get wanted at all points ..not only at one cop..PLEASE

TOP OF SCRIPT:
PHP код:
new Float:playerposx,Float:playerposy,Float:playerposz,wantedlevel
PHP код:
stock GetVehicleSpeed(vehicleid)
{
        if(
vehicleid != INVALID_VEHICLE_ID)
        {
                new 
Float:Pos[3],Float:VS ;
                
GetVehicleVelocity(vehicleidPos[0], Pos[1], Pos[2]);
                
VS floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return 
floatround(VS,floatround_round);
        }
        return 
INVALID_VEHICLE_ID;
}
stock GetPlayerSpeed(playerid)
{
        if(
playerid != INVALID_PLAYER_ID)
        {
                new 
Float:Pos[3],Float:PS;
                
GetPlayerVelocity(playeridPos[0], Pos[1], Pos[2]);
                
PS floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return 
floatround(PS,floatround_round);
        }
        return 
INVALID_PLAYER_ID;
}
CMD:radargun(playerid,params[])
{
    if(
ClassPolice && GetPlayerWeapon(playerid) == 43)
    {
    
GetPlayerPos(playerid,playerposx,playerposy,playerposz);
    
TogglePlayerControllable(playerid,0);
    }
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    for(new 
0MAX_PLAYERSi++)
    {
     if (
IsPlayerConnected(playerid))
      {
    if (
IsPlayerInRangeOfPoint(playerid,playerposx,playerposy,playerposz,60.0) && GetPlayerSpeed(playerid) <= 120)
    {
    
SetPlayerWantedLevel(playerid,wantedlevel+1);
    }
    }
    }
    return 
1;

Reply


Messages In This Thread
Camera on PPC_TRUCKING - by wumpyc - 31.10.2011, 09:16
Re: Camera on PPC_TRUCKING - by GAMER_PS2 - 31.10.2011, 09:26
Re: Camera on PPC_TRUCKING - by Stigg - 31.10.2011, 09:49
Re: Camera on PPC_TRUCKING - by knackworst - 31.10.2011, 09:50
Re: Camera on PPC_TRUCKING - by Vince - 31.10.2011, 10:12
Re: Camera on PPC_TRUCKING - by wumpyc - 31.10.2011, 11:39
Re: Camera on PPC_TRUCKING - by wumpyc - 31.10.2011, 16:17
Re: Camera on PPC_TRUCKING - by wumpyc - 31.10.2011, 18:21
Re: Camera on PPC_TRUCKING - by FUNExtreme - 31.10.2011, 18:49
Re: Camera on PPC_TRUCKING - by DRIFT_HUNTER - 31.10.2011, 19:15

Forum Jump:


Users browsing this thread: 5 Guest(s)