Whats Wrong Here?
#1

Код:
C:\PROGRA~1\ROCKST~1\GAMEMO~1\sftdm.pwn(2039) : error 001: expected token: ";", but found "{"
C:\PROGRA~1\ROCKST~1\GAMEMO~1\sftdm.pwn(2041) : error 010: invalid function or declaration
C:\PROGRA~1\ROCKST~1\GAMEMO~1\sftdm.pwn(2045) : error 054: unmatched closing brace ("}")
C:\PROGRA~1\ROCKST~1\GAMEMO~1\sftdm.pwn(2049) : error 054: unmatched closing brace ("}")
Code:

Код:
SetTimer("WantedCheck", 1000, true);
forward WantedCheck();



public WantedCheck
{

if GetPlayerWantedLevel(playerid) > 0)
{
SendClientMessage(playerid, COLOR_RED, "== Lose Your Stars, fool!");

}



}
Reply
#2

try this:
pawn Код:
public WantedCheck()
{
 for(new i=0; i<MAX_PLAYERS; i++)
 {
   if(GetPlayerWantedLevel(i) > 0)
   {
    SendClientMessage(i, COLOR_RED, "== Lose Your Stars, fool!");
   }
 }
}
but remember that that will send the player a message every second if their wanted level is greater than 0.
You may want to make a variable to check if it has already sent the message to the player.
Reply
#3

ok got it one question though..

|| is or right?
Reply
#4

Quote:
Originally Posted by cj101
ok got it one question though..

|| is or right?
what?..
Reply
#5

if i want to say

if WantedLevel = 4 or 5

or dont work.. what do i put there?
Reply
#6

i think i understand what your trying to say...sorry if not:
pawn Код:
public WantedCheck()
{
 for(new i=0; i<MAX_PLAYERS; i++)
 {
   if(GetPlayerWantedLevel(i) == 1)
   {
    SendClientMessage(i, COLOR_RED, "You now have one star wanted level!");
   }
   else if(GetPlayerWantedLevel(i) == 2)
   {
    SendClientMessage(i, COLOR_RED, "You now have a two star wanted level!");
   }
   else if(GetPlayerWantedLevel(i) == 3)
   {
    //and so on
   }
 }
}
Reply
#7

Why?

pawn Код:
public WantedCheck()
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(GetPlayerWantedLevel(i) == 4 || GetPlayerWantedLevel(i) == 5)
    {
      //Do stuff
    }
  }
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)