- 0
Bug sistem radar politie
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
TheGodfather
Salut, am un sistem de radar dar nu merge, nu prinde niciun jucator.
function OtherTimer() {
new stringg[180], iswar;
//radar
foreach(new i : Player) {
if(RadarCooldown[i] > 0) RadarCooldown[i] --;
}
//radar
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
Asta de jos e la functia function Checkvehinfo(i)
new spe = Carspeed(i);
foreach(new x : Player) {
if(Radar[x] > 0) {
new Float:rPos[3];
GetPlayerPos(x, rPos[0],rPos[1],rPos[2]);
GetXYInFrontOfPlayer(x, rPos[0],rPos[1], 100.0);
if(IsPlayerInRangeOfPoint(i, 60, rPos[0],rPos[1],rPos[2])) {
if(spe > Radar[x] && PlayerInfo[i][pWantedLevel] == 0 && !IsACop(i)) {
UsedFind[x] = 1;
CP[x] = 53;
new Float:X,Float:Y,Float:Z;
GetPlayerPos(i, X,Y,Z);
SetPlayerCheckpointEx(x, X,Y,Z, 3.5);
targetfind[x] = i;
SCMf(x,COLOR_YELLOW,"{ff0000}%s{ffffff} was caught speeding with %d km/h where the limit is {ff0000}%d km/h.",GetName(i),spe,Radar[x]);
SCMf(i,COLOR_YELLOW,"You have been caught speeding with a speed of {ff0000}%d km/h{ffffff} where the limit is {ff0000}%d km/h.",spe,Radar[x]);
SetPlayerWantedLevel(i, 2);
PlayerInfo[i][pWantedLevel] += 2;
//SetPlayerCriminal(i,x, "speeding",2);
//culoarewanted
SetPlayerColor(i, 0xFF0033FF);
//culoarewanted
SetPlayerCriminal(i, 255 ,"speeding");
WantedTime[i] = 0;
Update(i,pWantedLevelx);
TogglePlayerControllable(x, 1);
Radar[x] = 0;
}
}
}
}
//radar
YCMD:radar(playerid,params[],help) {
if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
if(RadarCooldown[playerid] > 0) return SCMf(playerid,COLOR_GREY,"Wait %d seconds to place a radar.",RadarCooldown[playerid]);
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 14) {
if(OnDuty[playerid] == 1) {
new vehicle = GetVehicleID(GetPlayerVehicleID(playerid));
if(ServerVehicles[vehicle][vFaction] == 1 || ServerVehicles[vehicle][vFaction] == 14) {
new maxspeed;
if(sscanf(params, "i", maxspeed)) return SCM(playerid,-1,"{FF6699}Usage: {ffffff}/radar <max speed>");
if(maxspeed < 100 || maxspeed > 270) return SCM(playerid, COLOR_GREY, "Minimum speed is 100 km/h and maximum speed is 270 km/h.");
Radar[playerid] = maxspeed;
SCMf(playerid,COLOR_YELLOW,"You have placed a radar for %d km/h.",maxspeed);
TogglePlayerControllable(playerid, 0);
gString[0] = EOS;
format(gString, sizeof(gString), "%s placed a radar (%d km/h) in %s.",GetName(playerid),maxspeed,GetPlayerZone(playerid));
SendFactionMessage(1,COLOR_CLIENT,gString);
SendFactionMessage(2,COLOR_CLIENT,gString);
SendFactionMessage(3,COLOR_CLIENT,gString);
SendFactionMessage(14,COLOR_CLIENT,gString);
RadarCooldown[playerid] = 45;
}
else return SCM(playerid,-1,"You are not in a faction vehicle!");
}
else return SCM(playerid,-1,"You are not on duty!");
}
else return SCM(playerid,-1,"Only LSPD and LVPD members can use this command!");
return 1;
}
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now