Increase someone is wanted lvl
#1

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?
Reply
#2

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 :$
Reply
#3

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);
}
}
Reply
#4

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
Reply
#5

Have you placed it under 'OnPlayerEnterVehicle'?

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

Still doesnt increases my wantedlevel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)