Need little help (( not really hard I think )) -
propilot - 26.07.2009
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.
Re: Need little help (( not really hard I think )) -
refshal - 26.07.2009
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
Re: Need little help (( not really hard I think )) -
propilot - 26.07.2009
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
Re: Need little help (( not really hard I think )) -
MadeMan - 26.07.2009
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??
Re: Need little help (( not really hard I think )) -
propilot - 26.07.2009
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.
Re: Need little help (( not really hard I think )) -
propilot - 26.07.2009
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?
Re: Need little help (( not really hard I think )) -
MadeMan - 26.07.2009
Check if all brackets "{" and "}" match. I mean for every opening bracket "{" should be a closing bracket "}" and not more!
Re: Need little help (( not really hard I think )) -
refshal - 26.07.2009
You forgot OnPlayerCommandText. XD