/////////////cpk **szodnew Float:pizzak[9][3] = {{1269.4034,194.8707,19.1411}, // pizzacp1{1480.4790,378.3343,19.5996}, // pizzacp2{1406.8604,325.0777,18.5850}, // pizzacp3{2269.3328,95.6417,26.0630}, // pizzacp4{2257.4968,145.5856,26.0634}, // pizzacp5{2326.7285,-102.2134,26.0631}, // pizzacp7{2389.2195,-32.1964,26.0613}, // pizzacp8{2397.7119,20.7947,26.0632}, // pizzacp9{2448.2112,45.2753,26.0624}};
CMD:rszallit(playerid){Pizzas[playerid] = 1;new rnd = random(sizeof(pizzak));SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2);///ide kellene hogy tovább dobjon még 2 darab cp re és és a cpknék kapjon pénzt return 1;}
public OnPlayerEnterCheckpoint(playerid){if(Pizzas[playerid] == 1){ new reson; new rnd = random(sizeof(pizzak)); switch(reson) { case 0: { SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2); } case 1: { GameTextForPlayer(playerid, \"két almafa\", 5000, 1); SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2); } case 2: { GameTextForPlayer(playerid, \"taps kivitted\", 5000, 1); DisablePlayerCheckpoint(playerid); } }} DisablePlayerCheckpoint(playerid);return 1;}
CMD:rszallit(playerid){if(GetPVarInt(playerid, \"PizzaCheckpoint\") == 0){Pizzas[playerid] = 1;new rnd = random(sizeof(pizzak));SetPVarInt(playerid, \"PizzaCheckpoint\", 1);SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2);}return 1;}public OnPlayerEnterCheckpoint(playerid){if(Pizzas[playerid] == 1){new rnd = random(sizeof(pizzak));if(GetPVarInt(playerid, \"PizzaCheckpoint\") == 1){ SetPVarInt(playerid, \"PizzaCheckpoint\", 2); SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2);}else if(GetPVarInt(playerid, \"PizzaCheckpoint\") == 2){ SetPVarInt(playerid, \"PizzaCheckpoint\", 3); GameTextForPlayer(playerid, \"két almafa\", 5000, 1); SetPlayerCheckpoint(playerid,pizzak[rnd][0],pizzak[rnd][1],pizzak[rnd][2],2);}else if(GetPVarInt(playerid, \"PizzaCheckpoint\") == 3){ SetPVarInt(playerid, \"PizzaCheckpoint\", 0); GameTextForPlayer(playerid, \"taps kivitted\", 5000, 1); DisablePlayerCheckpoint(playerid);}}return 1;}