SA-MP Forums Archive
Wanted Stars - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wanted Stars (/showthread.php?tid=201068)



Wanted Stars - djaCido23 - 20.12.2010

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/


Re: Wanted Stars - CrucixTM - 20.12.2010

Post your code please?


Re: Wanted Stars - Face9000 - 20.12.2010

Post your code.

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


Re: Wanted Stars - djaCido23 - 20.12.2010

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


Re: Wanted Stars - Face9000 - 20.12.2010

No it's not that the code.


Re: Wanted Stars - Fool - 20.12.2010

Look for onplayerentervehicle.


Re: Wanted Stars - djaCido23 - 20.12.2010

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;
}



Re: Wanted Stars - Tessar - 20.12.2010

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.


Re: Wanted Stars - djaCido23 - 20.12.2010

ok...Thanks all.


Re: Wanted Stars - Tessar - 20.12.2010

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