28.07.2011, 09:52
use something like this
of course if you will
of course if you will

PHP код:
#include <a_samp>
#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
new SomeJob[256]; //edit this
public OnFilterScriptInit()
{
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/job", cmdtext, true, 10) == 0)
{
SomeJob[playerid] = 1;
SetPlayerCheckpoint(playerid,1246.2437,-1847.1620,13.5907,5);// 1. cp (checkpoint) change the cordinates
Return 1;
}
return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(SomeJob[playerid] == 1){
SomeJob[playerid] = 2;
SetPlayerCheckpoint(playerid,1042.0785,-1760.6067,13.5953,5);2. cp (checkpoint) change the cordinates
return 1;
}
if(SomeJob[playerid] == 2){
SomeJob[playerid] = 3;
SetPlayerCheckpoint(playerid,1042.0785,-1760.6067,13.5953,5);3. cp (checkpoint) change the cordinates
return 1;
}
//and if your last check point is you add this
if(SomeJob[playerid] == 3){
SomeJob[playerid] = 0;
DisablePlayerCheckpoint(playerid);
return 1;
}
return 1;
}