- 0
Putin ajutor la Radar ?
-
Similar Content
-
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
bLoN
Salut am folosesc un sistem de radar pe un GM HPQ Edit ! Si de fiecare data cand trec pe langa PD-ul cu Radar , nu primeste nimeni nimic , nici eu nici el.
Las mai jos tot !
Atentie ! Ofer PSF de 10e Celui care ma ajuta sa o fac perfect functionabila.
//radar
new RadarCooldown[MAX_PLAYERS];
new Radar[MAX_PLAYERS];
//radar
YCMD:radar(playerid,params[],help) {
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] == 13) {
if(OnDuty[playerid] == 1) {
new vehicle = GetVehicleID(GetPlayerVehicleID(playerid));
if(ServerVehicles[vehicle][vFaction] == 1 || ServerVehicles[vehicle][vFaction] == 13) {
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(13,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;
}
YCMD:stopradar(playerid, params[], help) {
if(Radar[playerid] == 0) return SCM(playerid,-1,"You don't have a radar placed!");
Radar[playerid] = 0;
SCM(playerid,COLOR_YELLOW,"You have stopped the radar!");
TogglePlayerControllable(playerid, 1);
RadarCooldown[playerid] = 30;
return 1;
}
//Functia OtherTime
function OtherTimer() {
foreach(new i : Player) {
if(RadarCooldown[i] > 0) RadarCooldown[i] --;
}
//functia Checkvehinfo
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, 1);
PlayerInfo[i][pWantedLevel] += 1;
//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;
}
}
}
}
//Stock-uri
stock ResetVariables(playerid) {
Radar[playerid] = 0;
//
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));
}
Astept Privat Mesaj ! Rog seriozitate , multumesc anticipat.
Edited by bLoN9 answers 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