Help With Decreasing Wanted Levels
#1

Ok im trying to make wanted levels decrease every 4 mins from level 9 to 0 and im trying to do it without someone showing me xD

But im getting a error:

Код:
C:\Users\Weponz\Desktop\Server Files\gamemodes\TESTING.pwn(22) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Now im not even sure if this is the right way to do this but i thought about it and it looks like it could work.

Can someone 1st help me with the error and if i am doing it wrong state what im doing wrong please

And ive started on 9 to 8 the other timers are just there cause it compiles regardless

Heres the code:

pawn Код:
#include <a_samp>

public OnGameModeInit()
{
    SetTimer("wanted9to8",240000,false);
    SetTimer("wanted8to7",240000,false);
    SetTimer("wanted7to6",240000,false);
    SetTimer("wanted6to5",240000,false);
    SetTimer("wanted5to4",240000,false);
    SetTimer("wanted4to3",240000,false);
    SetTimer("wanted3to2",240000,false);
    SetTimer("wanted2to1",240000,false);
    SetTimer("wanted1to0",240000,false);
   
    return 1;
}

forward wanted9to8(playerid);
public wanted9to8(playerid)
{
 GetPlayerWantedLevel(playerid);
 if(GetPlayerWantedLevel(playerid) == 9);//Line 22
 SetPlayerWantedLevel(playerid, 8);
 SendClientMessage(playerid, 0x0,"[WANTED] You Have Lost A Wanted Level![Level 8]");

 return 1;
 
}
I commented the line with the error line 22

Thanks in advanced!
Reply
#2

What is line 21 doing? and if statements don't end with a semicolon AKA ';'
Reply
#3

Try doing it like this, i havent test it, but if it doesn't work so me the errors.

pawn Код:
if(GetPlayerWantedLevel(playerid) == 9);
{
 SetPlayerWantedLevel(playerid,8);
 SendClientMessage(playerid, 0x0,"[WANTED] You Have Lost A Wanted Level![Level 8]");
}
Reply
#4

@ Steven82

Thanks,

I still get the "Empty Statement" error.

EDIT:

@ Retardedwolf

Thanks dude,

I just typed it up quick,And i didnt know that about if statements xD

Thanks Guys!

Compiles
Reply
#5

pawn Код:
forward wanted9to8 ( playerid );
public wanted9to8  ( playerid )
{
    if ( GetPlayerWantedLevel ( playerid ) == 9 )
    {
        SetPlayerWantedLevel ( playerid, 8 );
        SendClientMessage ( playerid, 0xFFFFFFAA,"[WANTED] You have lost a wanted level![Level 8]");
    }
    return 1;
}
Reply
#6

Thanks man edited my post i missed ur reply the 1st time and seen it the second
Reply
#7

Well dang i guess im getting tired well im off the forums for the night, Retardedwolf, i'll get you next time.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)