03.10.2014, 13:52
Hello All
Guys i Want Know Somthings
i Can Making This Checkpoints Appear All Not Withe else to making it one after one after one i want making all showing and last one else to after i take all the last one give money
example please +rep
this last one
Guys i Want Know Somthings
i Can Making This Checkpoints Appear All Not Withe else to making it one after one after one i want making all showing and last one else to after i take all the last one give money
example please +rep
PHP код:
new CP[MAX_PLAYERS];
CMD:rob(playerid, params[])
{
CP[playerid] = 0;
SetPlayerCheckpoint(playerid, -1447.2351,1502.1000,1.7366, 6.6);
SendClientMessage(playerid, 0xFF0000, "This text is red.");
SendClientMessage(playerid, 0xFF0000FF, "Wanted Level: 6");
return 1;
}
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(CP[playerid] == 0)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1454.8569,1489.1010,7.1016, 3.0);//Second CP
CP[playerid] = 1;
}
else if(CP[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1428.7382,1490.0945,7.1016, 3.0);//Third CP
CP[playerid] = 2;
}
else if(CP[playerid] == 2)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1402.7249,1486.1351,7.1016, 3.0);//Fourth CP
CP[playerid] = 3;
}
else if(CP[playerid] == 3)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1382.1962,1480.3761,8.5625, 3.0);
CP[playerid] = 4;
}
else if(CP[playerid] == 4)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1376.8267,1492.7152,11.2031, 3.0);
CP[playerid] = 5;
}
else if(CP[playerid] == 5)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, -1390.7821,1483.1436,1.8672, 3.0);
CP[playerid] = 6;
}
PHP код:
else if(CP[playerid] == 6)//Last CP
{
DisablePlayerCheckpoint(playerid);
CP[playerid] = -1;
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+6);
GivePlayerMoney(playerid, 40000+random(120000));
}
return 1;
}