if(Pszallitas[playerid] == 1){ if(IsPlayerInAnyVehicle(playerid)){ new carid = GetPlayerVehicleID(playerid); new cash=(random(100-50)+0); new rnd = random(sizeof(PizzaCP)); if(pizzasmotorok(carid)) { switch(Ppickup[playerid][0]) { case 0: { PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); format(string, sizeof(string), \"~w~Kaptál ~g~%d$-ot.\", cash); GameTextForPlayer(playerid, string, 5000, 1); SafeGivePlayerMoney(playerid,cash); PlayerInfo[playerid][Penz] += cash; varoskassza -= cash, Savevaroskassza(); SetPlayerCheckpoint(playerid,PizzaCP[rnd][0],PizzaCP[rnd][1],PizzaCP[rnd][2],2); } case 1: { PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); format(string, sizeof(string), \"~w~Kaptál ~g~%d$-ot.\", cash); GameTextForPlayer(playerid, string, 5000, 1); SafeGivePlayerMoney(playerid,cash); PlayerInfo[playerid][Penz] += cash; varoskassza -= cash, Savevaroskassza(); SetPlayerCheckpoint(playerid,PizzaCP[rnd][0],PizzaCP[rnd][1],PizzaCP[rnd][2],2); } case 2: { PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); format(string, sizeof(string), \"~w~Kaptál ~g~%d$-ot.\", cash); GameTextForPlayer(playerid, string, 5000, 1); SafeGivePlayerMoney(playerid,cash); PlayerInfo[playerid][Penz] += cash; varoskassza -= cash, Savevaroskassza(); SendClientMessage(playerid,COLOR_YELLOW,\"Leszállítottál 3 pizzát, menj vissza az éttermebe és szállíts le még 3-at.\"); Pszallitas[playerid] = 0; DisablePlayerCheckpoint(playerid); Ppickup[playerid][0] = 0; Pszallitas[playerid] = 0; } } PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); }}return 1;}
Pszallitas[playerid][0]++;
Ppickup[playerid][0]++;
if(Pszallitas[playerid] == 1){if(IsPlayerInAnyVehicle(playerid)){new carid = GetPlayerVehicleID(playerid);new cash=(random(100-50)+0);new rnd = random(sizeof(PizzaCP));if(pizzasmotorok(carid)){ PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0); format(string, sizeof(string), \"~w~Kaptál ~g~%d$-ot.\", cash); GameTextForPlayer(playerid, string, 5000, 1); SafeGivePlayerMoney(playerid,cash); PlayerInfo[playerid][Penz] += cash; varoskassza -= cash, Savevaroskassza(); // switch(Ppickup[playerid][0]) { case 2: { SendClientMessage(playerid,COLOR_YELLOW,\"Leszállítottál 3 pizzát, menj vissza az éttermebe és szállíts le még 3-at.\"); Pszallitas[playerid] = 0; DisablePlayerCheckpoint(playerid); Ppickup[playerid][0] = 0; } default: { SetPlayerCheckpoint(playerid,PizzaCP[rnd][0],PizzaCP[rnd][1],PizzaCP[rnd][2],2); Ppickup[playerid][0]++; } }}}return 1;}
new cash=(random(100-50)+0);
new cash = random(50);
new cash = random(100-50)+50;