05.06.2013, 19:08
PHP код:
if( listitem == 0 )
{
//if(PlayerInfo[playerid][pPnumber] != 0)
//{
// SendClientMessage(playerid, COLOR_GREY, " Deja ai un Mobil ! ");
// return 1;
// }
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
if(GetPlayerCash(playerid) <= 5000) return SendClientMessage(playerid, COLOR_RED, "Nu ai destui bani pentru a cumpara de la 24/7!");
new skill = 5000 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 5000 - price;
format(string, sizeof(string), "~r~-%dLei", payout);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerCash(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
}
else
{
format(string, sizeof(string), "~r~-%dLei", 5000);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerCash(playerid,-5000);
SBizzInfo[9][sbTill] += 5000;
ExtortionSBiz(9, 5000);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pPnumber] = 700000000 + random(99999999);
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), " Ti-ai luat un Mobil nou numarul tau de telefon este %d", randphone);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");
return 1;
}