Help me pls
#1

Error:
PHP код:
error 010invalid function or declaration 
Script:
PHP код:
CMD:fps(playerid,params[])
{
        if(
fpsON[playerid] == 0)
        {
            
PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
            
TimerFPS SetTimerEx("AggiornaFPS"500true"i",playerid);
            
fpsON[playerid] = 1;
        }
        else if(
fpsON[playerid] == 1)
        {
            
PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
            
KillTimer(TimerFPS);
            
fpsON[playerid] = 0;
            
TextDrawHideForPlayer(playeridFPS[playerid]);
        }
        return 
1;
    }
    return 
0;

Reply
#2

Which line is the error?
Reply
#3

Try this

PHP код:
CMD:fps(playerid,params[])
{
    if(
fpsON[playerid] == 0)
     {
          
PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
        
TimerFPS SetTimerEx("AggiornaFPS"500true"i",playerid);
         
fpsON[playerid] = 1;
      }
    else if(
fpsON[playerid] == 1)
       {
         
PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
          
KillTimer(TimerFPS);
           
fpsON[playerid] = 0;
        
TextDrawHideForPlayer(playeridFPS[playerid]);
    }
     return 
1;

Reply
#4

Ty u so much

N0FeaR
Reply
#5

Never return 0 in a command! NEVER!
Reply
#6

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Never return 0 in a command! NEVER!
actually you can, if you want "SERVER: unknown command"

the problem with his code was that he had and extra "}"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)