Wanted Stars
#1

Hi...i have e problem with wanted points/level...when i enter in a police vehicle i got 2 stars and 1 wanted level...then if i enter again i got 4 stars and 1 wanted level...The problem is at wanted Stars...I have e picture here: /imageshack/i/samp023x.png/
Reply
#2

Post your code please?
Reply
#3

Post your code.

This forum requires that you wait 60 seconds between posts. Please try again in 4 seconds.
Reply
#4

i think this is the code: http://pastebin.com/2CLPimY5
Reply
#5

No it's not that the code.
Reply
#6

Look for onplayerentervehicle.
Reply
#7

ok...this is:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[256];
    new plname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, plname, sizeof(plname));
    format(string, sizeof(string), "%s a intrat in vehicul.", plname);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    if(gTeam[playerid] >= 1||gTeam[playerid] >= 3||gTeam[playerid] >= 4)
    {
        if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {}
            else {
                WantedPoints[playerid]+=2;
                SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
                new wanted = GetPlayerWantedLevel(playerid);
                SetPlayerWantedLevel(playerid, wanted + 1);
            }
        }
        if (IsAnAmbulance(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
            else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
        }
    }
    return 1;
}
Reply
#8

Change this bit
Код:
if (IsACopCar(vehicleid) && !ispassenger)
        {
            if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {}
            else {
                WantedPoints[playerid]+=1;
                SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
                new Float:cx, Float:cy, Float:cz;
                GetPlayerPos(playerid, cx, cy, cz);
                SetPlayerPos(playerid, cx,  cy, cz);
                new wanted = GetPlayerWantedLevel(playerid);
                SetPlayerWantedLevel(playerid, wanted + 1);
            }
        }
You needed to change
Код:
WantedPoints[playerid]+=2;
to
Код:
WantedPoints[playerid]+=1;
the 2 means the amount of stars. Now you know this you can mod the ambulance aswell.
Reply
#9

ok...Thanks all.
Reply
#10

Quote:
Originally Posted by djaCido23
Посмотреть сообщение
ok...Thanks all.
Does it work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)