SA-MP Forums Archive
Increase someone is wanted lvl - 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: Increase someone is wanted lvl (/showthread.php?tid=129938)



Increase someone is wanted lvl - bartje01 - 24.02.2010

Hey guys. I want that when someone enters a pd vehicle his wanted lvl increases by 1
Now I have this:
Код:
if(GetVehicleModel(vehicleid) == 596)
  if(GetPlayerColor(playerid) == 0xFFFFFFAA)
  SetPlayerWantedLevel(playerid,1);
  if(GetPlayerColor(playerid) == 0xFFFFFFAA)
  SendClientMessage(playerid, 0x33AA33AA, "You entered a police vehicle, you are wanted now");
  if(GetPlayerColor(playerid) == 0xFFFFFFAA)
  if(GetVehicleModel(vehicleid) == 596)
  SetPlayerColor(playerid,0xFF8000FF);
It works but it doesn't increase by one. It just don't give nmore wanted lvls. How can I do this?


Re: Increase someone is wanted lvl - bartje01 - 24.02.2010

Quote:
Originally Posted by Seif_
It didn't increase because you didn't script it. Use SetPlayerWantedLevel.
I did. 3rd line :P
Btw. Hi seif :$


Re: Increase someone is wanted lvl - VonLeeuwen - 24.02.2010

Quote:
Originally Posted by Seif_
Oh sorry.
pawn Код:
if(GetVehicleModel(vehicleid) == 596)
{
    if(GetPlayerColor(playerid) == 0xFFFFFFAA)
    {
        SetPlayerWantedLevel(playerid,1);
        SendClientMessage(playerid, 0x33AA33AA, "You entered a police vehicle, you are wanted now");
        SetPlayerColor(playerid,0xFF8000FF);
    }
}
He wanted to add a level, so I was thinking of this:

pawn Код:
if(GetVehicleModel(vehicleid) == 596)
{
if(GetPlayerColor(playerid) == 0xFFFFFFAA)
{
new wantedlevel = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid,wantedlevel + 1);
SendClientMessage(playerid, 0x33AA33AA, "You entered a police vehicle, you are wanted now");
SetPlayerColor(playerid,0xFF8000FF);
}
}



Re: Increase someone is wanted lvl - bartje01 - 24.02.2010

Alright, it is working but I want that when you step in a second time you have 2 wanted lvls
And when you step in again 3. and again 4. You know :P


Re: Increase someone is wanted lvl - VonLeeuwen - 24.02.2010

Have you placed it under 'OnPlayerEnterVehicle'?

If yes, this will work (if you use the one I gave you in previous reply)


Re: Increase someone is wanted lvl - bartje01 - 24.02.2010

Still doesnt increases my wantedlevel