Jump to content

Recommended Posts

Posted

 

if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GetPlayerName(playerid, sendername, sizeof(sendername));
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%d from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%d from giftbox.",sendername,FormatNumber(randmoney));
}
Posted

Credeam ca te prinzi singur nu am modificat la ambele string-uri. Uite:

 

format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
  format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
Posted

 

Credeam ca te prinzi singur nu am modificat la ambele string-uri. Uite:

format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
  format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));

M-am prins, am modificat si eu. Tot nu merge.

Posted

 

CMD:getgift(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(GiftBoxActiv == 0) return SendClientMessage(playerid, COLOR_WHITE, "The giftbox is not active.");
if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need 3 hours to use /getgift.");
if(PlayerInfo[playerid][pGiftTime] > 0)
          {
              new string[128];
              format(string,sizeof(string),"Mai poti folosi aceasta comanda peste %d ore.",PlayerInfo[playerid][pGiftTime]);
              SendClientMessage(playerid, COLOR_YELLOW, string);
              return 1;
}
    if(PlayerInfo[playerid][pGiftBox] == 1)
    {
if(IsPlayerInRangeOfPoint(playerid, 5.0, 834.2477,-2052.5186,12.8672))
    {
   new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.",sendername, randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(25);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
  SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
    SendClientMessage(playerid, COLOR_YELLOW, "Iti poti luat cadoul urmarind checkpoint-ul!");
   SetPlayerCheckpoint(playerid, 834.2477,-2052.5186,12.8672, 5.0);
   CP[playerid] = 43;
return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 2)  // asa faci si la giftbox 2/3/4
  {
if(IsPlayerInRangeOfPoint(playerid, 5.0, 2869.4817,-1589.1746,22.4913))
{
            new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.", sendername,randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
        }
else
{
    SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
SetPlayerCheckpoint(playerid, 2869.4817,-1589.1746,22.4913, 5.0);
CP[playerid] = 43;
return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 3)  // asa faci si la giftbox 2/3/4
  {
   if(IsPlayerInRangeOfPoint(playerid, 5.0, 1879.8340,1977.6876,13.7848))
{
            new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.",sendername, randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
   SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
   SetPlayerCheckpoint(playerid, 1879.8340,1977.6876,13.7848, 5.0);
   CP[playerid] = 43;
     return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 4)  // asa faci si la giftbox 2/3/4
  {
  if(IsPlayerInRangeOfPoint(playerid, 5.0, -791.5663,1436.9779,13.78913))
{
new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.", sendername,randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
SetPlayerCheckpoint(playerid, -791.5663,1436.9779,13.78913, 5.0);
            CP[playerid] = 43;
return 1;
}
}
return 1;
}

 

Nu stiu daca iti este compatibila, dar o poti incerca.

Posted
CMD:getgift(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(GiftBoxActiv == 0) return SendClientMessage(playerid, COLOR_WHITE, "The giftbox is not active.");
if(PlayerInfo[playerid][pConnectTime] < 2) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need 3 hours to use /getgift.");
if(PlayerInfo[playerid][pGiftTime] > 0)
          {
              new string[128];
              format(string,sizeof(string),"Mai poti folosi aceasta comanda peste %d ore.",PlayerInfo[playerid][pGiftTime]);
              SendClientMessage(playerid, COLOR_YELLOW, string);
              return 1;
}
    if(PlayerInfo[playerid][pGiftBox] == 1)
    {
if(IsPlayerInRangeOfPoint(playerid, 5.0, 834.2477,-2052.5186,12.8672))
    {
   new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.",sendername, randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(25);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
  SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
    SendClientMessage(playerid, COLOR_YELLOW, "Iti poti luat cadoul urmarind checkpoint-ul!");
   SetPlayerCheckpoint(playerid, 834.2477,-2052.5186,12.8672, 5.0);
   CP[playerid] = 43;
return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 2)  // asa faci si la giftbox 2/3/4
  {
if(IsPlayerInRangeOfPoint(playerid, 5.0, 2869.4817,-1589.1746,22.4913))
{
            new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.", sendername,randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
        }
else
{
    SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
SetPlayerCheckpoint(playerid, 2869.4817,-1589.1746,22.4913, 5.0);
CP[playerid] = 43;
return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 3)  // asa faci si la giftbox 2/3/4
  {
   if(IsPlayerInRangeOfPoint(playerid, 5.0, 1879.8340,1977.6876,13.7848))
{
            new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.",sendername, randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
   SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
   SetPlayerCheckpoint(playerid, 1879.8340,1977.6876,13.7848, 5.0);
   CP[playerid] = 43;
     return 1;
}
}
else if(PlayerInfo[playerid][pGiftBox] == 4)  // asa faci si la giftbox 2/3/4
  {
  if(IsPlayerInRangeOfPoint(playerid, 5.0, -791.5663,1436.9779,13.78913))
{
new randgift = random(150),string[256],sendername[30],string2[256],string4[256];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(randgift >= 0 && randgift <= 29)
{
new randmats = 2000 + random(28000);
PlayerInfo[playerid][pMats] += randmats;
Update(playerid, pMatsx);
format(string,sizeof(string),"Giftbox: Ai castigat %d materiale din giftbox",randmats);
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won %d Materials from giftbox.", sendername,randmats);
}
if(randgift >= 31 && randgift <= 59)
{
new str[1400];
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pCarLicT] = 500;
PlayerInfo[playerid][pFlyLic] = 1;
PlayerInfo[playerid][pFlyLicT] = 500;
PlayerInfo[playerid][pBoatLic] = 1;
PlayerInfo[playerid][pBoatLicT] = 500;
PlayerInfo[playerid][pGunLic] = 1;
PlayerInfo[playerid][pGunLicT] = 500;
mysql_format(SQL,str,1400,"UPDATE users SET `CarLic`='1',`CarLicT`='500',`FlyLic`='1',`FlyLicT`='500',`BoatLic`='1',`BoatLicT`='500',`GunLic`='1',`GunLicT`='500' WHERE `name`='%s'",PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str,"","");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit toate licentele pentru 500 ore.", "OK", "");
format(string2,sizeof(string),"(( Giftbox: %s a castigat toate licentele pentru 500 ore din giftbox! Felicitari! ))",sendername);
}
if(randgift >= 61 && randgift <= 89)
{
new randfw = 5 + random(20),str2[256];
PlayerInfo[playerid][pFWorks] += randfw;
mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `FWorks`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pFWorks],PlayerInfo[playerid][pNormalName]);
mysql_tquery(SQL,str2,"","");
format(string,sizeof(string),"Giftbox: Ai castigat %d artificii.",randfw);
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won %d Fireworks from giftbox.",sendername,randfw);
}
if(randgift >= 91 && randgift <= 109)
{
new randm = random(100);
if(randm >= 0 && randm <= 30)
{
new randmoney = 100000 + random(100000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 31 && randm <= 50)
     {
new randmoney = 300000 + random(200000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 51 && randm <= 80)
     {
new randmoney = 500000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
  if(randm >= 81 && randm <= 90)
    {
new randmoney = 1000000 + random(500000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randm >= 91)
{
new randmoney = 2000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
   ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
   format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 111 && randgift <= 119)
{
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
     format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
if(randgift >= 120 && randgift <= 129)
{
   if(PlayerInfo[playerid][pWarns] == 0)
   {
new randmoney = 1000000 + random(1000000);
GivePlayerCash(playerid, randmoney);
    Update(playerid, pCashx);
format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pWarns] = 0;
Update(playerid, pWarnsx);
format(string,sizeof(string),"Giftbox: You win Clear Warns from giftbox");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear Warns from giftbox.");
}
}
if(randgift >= 130 && randgift <= 139)
{
if(PlayerInfo[playerid][pFpunish] == 0)
     {
new randmoney = 1000000 + random(1000000);
    GivePlayerCash(playerid, randmoney);
   Update(playerid, pCashx);
   format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
else
{
PlayerInfo[playerid][pFpunish] = 0;
Update(playerid,pFpunishx);
format(string,sizeof(string),"Giftbx: You win Clear FP from giftbox.");
ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
format(string4,sizeof(string4),"%s won Clear FP from giftbox.");
}
}
if(randgift >= 141)
{
    PlayerInfo[playerid][pHiddenColor] += 1;
   Update(playerid, pHiddenColorx);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Ai primit o culoare hidden.", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat o culoare hidden din giftbox! Felicitari! ))",sendername);
}
if(randgift == 30 || randgift == 60 || randgift == 90 || randgift == 110 || randgift == 140)
{
if(PremiumMaxim > 0)
  {
    new randpoints = 5 + random(62);
   PlayerInfo[playerid][pPremiumPoints] += randpoints;
   Update(playerid, pPremiumPointsx);
   PlayerInfo[playerid][pTotalPP] += randpoints;
Update(playerid, pTotalPPx);
if(PlayerInfo[playerid][pTotalPP] >= 200 && PlayerInfo[playerid][pVIP] == 0)
{
   SCM(playerid, COLOR_ORANGE, "In contul tau s-au acumulat un total de 200 PP iar acum esti un VIP User.");
   PlayerInfo[playerid][pVIP] = 1;
   Update(playerid, pVIPx);
}
   PremiumMaxim -= 1;
   format(string,sizeof(string),"Giftbox: You win %d premium points from giftbox.",randpoints);
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat %d puncte premium din giftbox! Felicitari! ))",sendername, randpoints);
}
  else
{
new randmoney = 4000000 + random(1000000);
   GivePlayerCash(playerid, randmoney);
     Update(playerid, pCashx);
    format(string,sizeof(string),"Giftbox: You win $%s from giftbox.",FormatNumber(randmoney));
    ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", string, "OK", "");
    format(string4,sizeof(string4),"%s won $%s from giftbox.",sendername,FormatNumber(randmoney));
}
}
if(randgift >= 142)
{
                InsertPCar(playerid,522,Stock[10][vPrice],"NRG-500",1);
        ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Giftbox", "Giftbox: You won a bike (NRG-500) from giftbox!", "OK", "");
    format(string2,sizeof(string),"(( Giftbox: %s a castigat motocicleta de tip NRG-500! Felicitari! ))",sendername);
}
new y,m,d,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
PlayerInfo[playerid][pGiftTime] += 3;
ProxDetector(30.0, playerid, string4, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
SendClientMessageToAll(COLOR_GENANNOUNCE,string2);
Update(playerid, pGiftTimex);
mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", string, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
mysql_tquery(SQL,string,"","");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nu esti langa un giftbox.");
SendClientMessage(playerid, COLOR_YELLOW,  "Iti poti luat cadoul urmarind checkpoint-ul!");
SetPlayerCheckpoint(playerid, -791.5663,1436.9779,13.78913, 5.0);
            CP[playerid] = 43;
return 1;
}
}
return 1;
}

Nu stiu daca iti este compatibila, dar o poti incerca.

 

Nu a fost compatibil de la inceput, am schimbat eu niste chestii si acum merge. Mersi mult!

Posted

Si ce ti-am dat eu era bun doar ca n-ai stiut sa modifici peste tot.

Probabil ai modificat doar la asta si tu aveai mai multe sanse cu bani, nu doar 0-30. 

 

if(randm >= 0 && randm <= 30)

De ex daca mai aveai bani cand randm era > 50 si < 70 trebuia sa pui si la alea %s.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

moduri samp