Jump to content

[DELETED]Error /roll


MatR3
 Share

Recommended Posts

  1. CMD:roll(playerid, params[])
  2. {
  3.    
  4.     if(IsPlayerConnected(playerid))
  5.     {
  6.         if(GiftBoxActiv > 0)
  7.         {
  8.             if(floatround(PlayerInfo[playerid][pConnectTime], floatround_round) <= 4) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need 3 played hours to use /roll.");
  9.             if(PlayerInfo[playerid][pGiftTime] > 0)
  10.             {
  11.                 new string[128];
  12.                 if(PlayerInfo[playerid][pLanguage] == 2)
  13.                 {
  14.                     format(string,sizeof(string),"Poti folosi /roll peste %d ore",PlayerInfo[playerid][pGiftTime]);
  15.                     SendClientMessage(playerid, COLOR_NEWS, string);
  16.                     format(string,sizeof(string),"Timpul pe /sleep nu se pune, ore ramase: %d",PlayerInfo[playerid][pGiftTime]);
  17.                     SendClientMessage(playerid, COLOR_NEWS, string);
  18.                 }
  19.                 else
  20.                 {
  21.                     format(string,sizeof(string),"You will be able /roll in %d hours.",PlayerInfo[playerid][pGiftTime]);
  22.                     SendClientMessage(playerid, COLOR_RED, string);
  23.                     format(string,sizeof(string),"The time spent on /sleep doesn't count. hours need: %d",PlayerInfo[playerid][pGiftTime]);
  24.                     SendClientMessage(playerid, COLOR_RED, string);
  25.                 }
  26.                 return 1;
  27.             }
  28.             if(IsPlayerInRangeOfPoint(playerid,5.0, 176.1805,-1859.4982,3.2474))
  29.             {
  30.                 new randgift = random(100),string[256],sendername[30],randmoney,stringg[500],y,m,d,h,mi,s;
  31.                 getdate(y,m,d);
  32.                 gettime(h,mi,s);
  33.                 GetPlayerName(playerid,sendername,sizeof(sendername));
  34.                 if(randgift >= 0 && randgift <= 30)
  35.                 {
  36.                     randmoney = 500000 + random(500000) + random(1000000);
  37.                     GivePlayerCash(playerid, randmoney);
  38.                     Update(playerid, pCashx);
  39.                     format(string, sizeof(string), "%s a castigat $%s",sendername,FormatNumber(randmoney));
  40.                     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  41.                     ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  42.                     mysql_real_escape_string(string, stringg);
  43.                     mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  44.                     mysql_tquery(SQL,string,"","");
  45.                 }
  46.                 if(randgift >= 31 && randgift <= 59)
  47.                 {
  48.                     new str[1400];
  49.                     PlayerInfo[playerid][pCarLic] = 1;
  50.                     PlayerInfo[playerid][pCarLicT] = 500;
  51.                     PlayerInfo[playerid][pFlyLic] = 1;
  52.                     PlayerInfo[playerid][pFlyLicT] = 500;
  53.                     PlayerInfo[playerid][pBoatLic] = 1;
  54.                     PlayerInfo[playerid][pBoatLicT] = 500;
  55.                     PlayerInfo[playerid][pGunLic] = 1;
  56.                     PlayerInfo[playerid][pGunLicT] = 500;
  57.                     mysql_format(SQL,str,sizeof(str),"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]);
  58.                     mysql_tquery(SQL,str,"","");
  59.                     format(string,sizeof(string),"%s a castigat licentele pentru 500 ore.",sendername);
  60.                     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  61.                     ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  62.                     mysql_real_escape_string(string, stringg);
  63.                     mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  64.                     mysql_tquery(SQL,string,"","");
  65.                 }
  66.                 if(randgift >= 60 && randgift <= 69)
  67.                 {
  68.                     if(PlayerInfo[playerid][pWarns] == 0)
  69.                     {
  70.                         randmoney = 500000 + random(500000) + random(1000000);
  71.                         GivePlayerCash(playerid, randmoney);
  72.                         Update(playerid, pCashx);
  73.                         format(string, sizeof(string), "%s a castigat $%s",sendername,FormatNumber(randmoney));
  74.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  75.                         ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  76.                         mysql_real_escape_string(string, stringg);
  77.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  78.                         mysql_tquery(SQL,string,"","");
  79.                     }
  80.                     else
  81.                     {
  82.                         PlayerInfo[playerid][pWarns] = 0;
  83.                         Update(playerid, pWarnsx);
  84.                         format(string,sizeof(string),"%S a castigat 'sterge warnuri'.",sendername);
  85.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  86.                         ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  87.                         mysql_real_escape_string(string, stringg);
  88.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  89.                         mysql_tquery(SQL,string,"","");
  90.                     }
  91.                 }
  92.                 if(randgift >= 70 && randgift <= 79)
  93.                 {
  94.                     if(PlayerInfo[playerid][pFpunish] == 0)
  95.                     {
  96.                         randmoney = 500000 + random(500000) + random(1000000);
  97.                         GivePlayerCash(playerid, randmoney);
  98.                         Update(playerid, pCashx);
  99.                         format(string, sizeof(string), "%s a castigat $%s.",sendername,FormatNumber(randmoney));
  100.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  101.                         ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  102.                         mysql_real_escape_string(string, stringg);
  103.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  104.                         mysql_tquery(SQL,string,"","");
  105.                     }
  106.                     else
  107.                     {
  108.                         PlayerInfo[playerid][pFpunish] = 0;
  109.                         Update(playerid, pFpunishx);
  110.                         format(string,sizeof(string),"%s a castigat 'sterge faction punish'.",sendername);
  111.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  112.                         ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  113.                         mysql_real_escape_string(string, stringg);
  114.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  115.                         mysql_tquery(SQL,string,"","");
  116.                     }
  117.                 }
  118.                 if(randgift >= 80 && randgift <= 89)
  119.                 {
  120.                     PlayerInfo[playerid][pHiddenColor] += 1;
  121.                     Update(playerid, pHiddenColorx);
  122.                     format(string,sizeof(string),"(( Roll: {FFFF00}%s {A9C4E4}a castigat o culoare {C2A2DA}hidden {A9C4E4}din roll! Felicitari! ))",sendername);
  123.                     SendClientMessageToAll(COLOR_GENANNOUNCE, string);
  124.                     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", "You won a hidden color from the Roll.", "OK", "");
  125.                     mysql_real_escape_string(string, stringg);
  126.                     mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  127.                     mysql_tquery(SQL,string,"","");
  128.                 }
  129.                 if(randgift >= 90 && randgift <= 94)
  130.                 {
  131.                     new randpoints = 5 + random(31) + random(26),points,str2[128],count;
  132.                     PlayerInfo[playerid][pPremiumPoints] += randpoints;
  133.                     Update(playerid, pPremiumPointsx);
  134.                     format(string,sizeof(string),"(( Roll: {FFFF00}%s {A9C4E4}a castigat {FFFF00}%d puncte premium {A9C4E4}din Roll! Felicitari! ))",sendername,randpoints);
  135.                     SendClientMessageToAll(COLOR_GENANNOUNCE, string);
  136.                     format(string,sizeof(string),"You won %d premium points.",randpoints);
  137.                     ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  138.                     mysql_real_escape_string(string, stringg);
  139.                     mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`,`puncte`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d','%d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s,randpoints);
  140.                     mysql_tquery(SQL,string,"","");
  141.                     format(str2, sizeof(str2), "SELECT * FROM `giftbox_logs`");
  142.                     new Cache: ab = mysql_query(SQL, str2);
  143.                     for(new i, j = cache_get_row_count (); i != j; ++i)
  144.                     {
  145.                         points = cache_get_field_content_int(i, "puncte");
  146.                         count += points;
  147.                     }
  148.                     cache_delete(ab);
  149.                     format(string, sizeof(string), "(( Roll: Au fost castigate %d puncte premium. ))",(count+randpoints));
  150.                     SendClientMessageToAll(COLOR_GENANNOUNCE, string);
  151.                 }
  152.                 if(randgift >= 95)
  153.                 {
  154.                     new total,str2[256],masina=1;
  155.                     for(new v; v < MAX_PERSONAL_VEHICLES; v++)
  156.                     {
  157.                         if(PlayerInfo[playerid][pCar][v] != -1) total++;
  158.                     }
  159.                     if(total+1 > PlayerInfo[playerid][pCarSlots])
  160.                     {
  161.                         if(PlayerInfo[playerid][pCarSlots] < MAX_PERSONAL_VEHICLES)
  162.                         {
  163.                             PlayerInfo[playerid][pCarSlots] += 1;
  164.                             mysql_format(SQL,str2,sizeof(str2),"UPDATE users SET `CarSlots`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pCarSlots],PlayerInfo[playerid][pNormalName]);
  165.                             mysql_tquery(SQL,str2,"","");
  166.                         }
  167.                         else
  168.                         {
  169.                             masina = 0;
  170.                         }
  171.                     }
  172.                     if(masina == 1)
  173.                     {
  174.                         new result[128],count;
  175.                         InsertCar(playerid,104,1);
  176.                         format(string,sizeof(string),"(( Roll: {FFFF00}%s {A9C4E4}a castigat o masina {FFFF00}Stretch {A9C4E4}! Felicitari! ))",sendername);
  177.                         SendClientMessageToAll(COLOR_GENANNOUNCE, string);
  178.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", "You won a Stretch.", "OK", "");
  179.                         mysql_real_escape_string(string, stringg);
  180.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  181.                         mysql_tquery(SQL,string,"","");
  182.                         format(str2, sizeof(str2), "SELECT * FROM `giftbox_logs`");
  183.                         new Cache: ab = mysql_query(SQL, str2);
  184.                         for(new i, j = cache_get_row_count (); i != j; ++i)
  185.                         {
  186.                             cache_get_field_content(i, "text", result);
  187.                             if(strfind(result, "Bullet", true) != -1) count++;
  188.                         }
  189.                         cache_delete(ab);
  190.                         format(string, sizeof(string), "(( Roll: Au fost castigate %d masini ))",(count+1));
  191.                         SendClientMessageToAll(COLOR_GENANNOUNCE, string);
  192.                     }
  193.                     else
  194.                     {
  195.                         randmoney = 500000 + random(500000) + random(1000000);
  196.                         GivePlayerCash(playerid, randmoney);
  197.                         Update(playerid, pCashx);
  198.                         format(string, sizeof(string), "%s a castigat $%s",sendername,FormatNumber(randmoney));
  199.                         ShowPlayerDialog(playerid, DIALOG_GIFTBOX, DIALOG_STYLE_MSGBOX, "Premiu Roll", string, "OK", "");
  200.                         ProxDetector(30.0, playerid, string,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS,COLOR_NEWS);
  201.                         mysql_real_escape_string(string, stringg);
  202.                         mysql_format(SQL, string, sizeof(string), "INSERT INTO giftbox_logs (`text`,`PlayerID`,`time`) VALUES ('%s','%d','%02d/%02d/%d %02d:%02d:%02d')", stringg, PlayerInfo[playerid][pSQLID],d,m,y,h,mi,s);
  203.                         mysql_tquery(SQL,string,"","");
  204.                     }
  205.                 }
  206.                 PlayerInfo[playerid][pGiftTime] += 5;
  207.                 Update(playerid, pGiftTimex);
  208.             }
  209.             else
  210.             {
  211.                 SendClientMessage(playerid, COLOR_RED, "Nu esti pe plaja.");
  212.                 SendClientMessage(playerid, COLOR_YELLOW, "Mergi la checkpoint-ul de pe minimap pentru a ajunge pe plaja!");
  213.                 SetPlayerCheckpoint(playerid,176.1805,-1859.4982,3.2474,5.0);
  214.                 CP[playerid] = 6868;
  215.                 return 1;
  216.             }
  217.         }
  218.         else return SendClientMessage(playerid, COLOR_RED, "Sistemul Roll nu este activat.");
  219.     }
  220.     return 1;
  221. }
  222. C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20886) : error 017: undefined symbol "MAX_PERSONAL_VEHICLES"
    C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20888) : error 017: undefined symbol "pCar"
    C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20888) : error 029: invalid expression, assumed zero
    C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20888) : warning 215: expression has no effect
    C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20888) : error 001: expected token: ";", but found "]"
    C:\Users\Ionut\Desktop\GM TOT\GM 2019\gamemodes\BigZoneGM.pwn(20888) : fatal error 107: too many error messages on one line

    Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


    5 Errors.
     

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...