Need little help (( not really hard I think ))
#1

Hey I want to change this

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if (newstate==PLAYER_STATE_DRIVER)
      {
        if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
        {
        if  (avisado1[playerid]==-1)
          {
                GameTextForPlayer(playerid,"~w~Press ~b~Buttom 2~n~~w~to start ~r~Your~n~~w~mission",3000,5);//SetTimerEx("MandarMensaje",5500,0,"%d",playerid);
                }
            else
              {
              KillTimer(avisado1[playerid]);
              avisado1[playerid]=-1;
              }
          }
      }
    if  (newstate==PLAYER_STATE_ONFOOT)
      {
      if    ((playerInMiniMission[playerid]!=0)&&(avisado1[playerid]==-1))
          {
          GameTextForPlayer(playerid,"~You have ~r~10 sec ~n~~w~ to get a Truck",3000,4);
          avisado1[playerid]=SetTimerEx("terminarMission",10000,0,"%d",playerid);
          }
      }
    return 1;
    }
To a command can anyone help me.

Yes, it possible xD

Thank you.
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/yourcommand", true) == 0)
{
  if (newstate==PLAYER_STATE_DRIVER)
  {
    if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
    {
      if(avisado1[playerid]==-1)
      {
        GameTextForPlayer(playerid,"~w~Press ~b~Buttom 2~n~~w~to start ~r~Your~n~~w~mission",3000,5);//SetTimerEx("MandarMensaje",5500,0,"%d",playerid);
      }
      else
      {
        KillTimer(avisado1[playerid]);
        avisado1[playerid]=-1;
      }
    }
  }
  if(newstate==PLAYER_STATE_ONFOOT)
    {
    if((playerInMiniMission[playerid]!=0)&&(avisado1[playerid]==-1))
    {
      GameTextForPlayer(playerid,"~You have ~r~10 sec ~n~~w~ to get a Truck",3000,4);
      avisado1[playerid]=SetTimerEx("terminarMission",10000,0,"%d",playerid);
    }
  }
  return 1;
}
:d
Reply
#3

Quote:
Originally Posted by еddy
pawn Код:
if(strcmp(cmdtext, "/yourcommand", true) == 0)
{
  if (newstate==PLAYER_STATE_DRIVER)
  {
    if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
    {
      if(avisado1[playerid]==-1)
      {
        GameTextForPlayer(playerid,"~w~Press ~b~Buttom 2~n~~w~to start ~r~Your~n~~w~mission",3000,5);//SetTimerEx("MandarMensaje",5500,0,"%d",playerid);
      }
      else
      {
        KillTimer(avisado1[playerid]);
        avisado1[playerid]=-1;
      }
    }
  }
  if(newstate==PLAYER_STATE_ONFOOT)
    {
    if((playerInMiniMission[playerid]!=0)&&(avisado1[playerid]==-1))
    {
      GameTextForPlayer(playerid,"~You have ~r~10 sec ~n~~w~ to get a Truck",3000,4);
      avisado1[playerid]=SetTimerEx("terminarMission",10000,0,"%d",playerid);
    }
  }
  return 1;
}
:d
nop. not this thanks for help anyways


I ment delete the keys that this thing will work only on a command
Reply
#4

Quote:
Originally Posted by [PPFS
propilot ]
I ment delete the keys that this thing will work only on a command
What eddy's code does then??
Reply
#5

Quote:
Originally Posted by MadeMan
Quote:
Originally Posted by [PPFS
propilot ]
I ment delete the keys that this thing will work only on a command
What eddy's code does then??
oh my bad i looked at my own code lol sorry.
Reply
#6

not working

C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(9 : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(100) : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(102) : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(104) : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(10 : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(115) : error 010: invalid function or declaration
C:\DOCUME~1\Alex\Desktop\Xoomer.pwn(117) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.


anyhelp?
Reply
#7

Check if all brackets "{" and "}" match. I mean for every opening bracket "{" should be a closing bracket "}" and not more!
Reply
#8

You forgot OnPlayerCommandText. XD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)