04.02.2014, 12:24
How To Set This To Random Checkpoint ? Player Go To Random Checkpoint Give Money This is Code :
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2306.7969,-5.9403,26.7422))
{
if(HarvestJob[playerid] == 1){
HarvestJob[playerid] = 2;
SetPlayerCheckpoint(playerid,-488.9691,-1454.4095,13.6985,10);
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 2){
HarvestJob[playerid] = 3;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SetPlayerCheckpoint(playerid,-491.1559,-1590.0781,6.0986,10);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 3){
HarvestJob[playerid] = 4;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SetPlayerCheckpoint(playerid,-517.1489,-1494.8715,10.6554,10);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 4){
HarvestJob[playerid] = 5;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SetPlayerCheckpoint(playerid,-537.1957,-1495.2427,9.5398,10);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 5){
HarvestJob[playerid] = 6;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SetPlayerCheckpoint(playerid,-538.4468,-1594.6807,7.9598,10);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 6){
HarvestJob[playerid] = 7;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
SetPlayerCheckpoint(playerid,-562.2611,-1505.3055,8.7389,10);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}Go To Next Checkpoint");
return 1;
}
if(HarvestJob[playerid] == 7){
HarvestJob[playerid] = 0;
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
DisablePlayerCheckpoint(playerid);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 4);
new string[200];//We are defining a new string for the formatted message that we are displaying later on.
new cash = random(500000);
GivePlayerMoney(playerid, cash);
format(string, sizeof(string), "{00FFFF}[Shoghl] {FFFF00}Keshavarze Zahmatkesh {FF0000}Mablaghe {FFFFFF}$%d Va {FF0000}+1 Score {FFFF00}Daryaft Kard!", cash);
SendClientMessageToAll(COLOR_WHITE, string);
GameTextForPlayer(playerid,"~w~Mamnoon. ~y~Khaste ~w~Nabashid",4000,3);
}
}
return 1;
}
}


