08.05.2012, 21:30
how can i make so if i get a phonebook all numbers start with 750XXXXXXX?all numbers?so at start i dont want a phonebook but if i buy a phone book i get a number 750XXXXXXX..this is the buy..
PHP код:
if (item == 1 && GetPlayerCash(playerid) > 500)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 500 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 500 - price;
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerCash(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
}
else
{
format(string, sizeof(string), "~r~-$%d", 500);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerCash(playerid,-500);
SBizzInfo[9][sbTill] += 500;
ExtortionSBiz(9, 500);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new randphone = 1000000 + random(8999999);//minimum 1000 max 9999
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), " Mobile Phone Purchased your new Number is %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;
}