Advertisement
Guest User

Untitled

a guest
Jul 14th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 21.76 KB | None | 0 0
  1. /*
  2.  
  3. ------------Laptop System by Compton's_Eazy_E-------------
  4.  
  5. */
  6.  
  7. #include <a_samp>
  8. #include <dini>
  9. #include "../include/gl_common.inc"
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" PC portable by Darkdi4bl0");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21.    print("\n--------------------------------------");
  22.     print(" PC portable by Darkdi4bl0");
  23.    print("--------------------------------------\n");
  24.    return 1;
  25. }
  26.  
  27.  
  28. new InChat[MAX_PLAYERS];
  29. forward LapUsersMssg(color,const string[]);
  30. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  31. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  32.  
  33. new RandomMSG[][] =
  34. {
  35.     "Tu est sur google! Que cherche tu?",
  36.     "Page pornographique, firefox ne peut pas continuer!",
  37.     "Cette page ne peut pas etre chargée.",
  38.     "A été détecté sur cette page, des virus ou malware, firefox ne peut donc pas continuer!",
  39.     "Tu est sur le site de SA:MP!",
  40.     "Tu est sur un site de hacking! fait attention!",
  41.     "Tu est sur Ebay! Fait attention au arnaque!",
  42.     "Bienvenue sur LeBonCoin, dans qu'elle region veut tu effectuer ta recherche?",
  43.     "Vous étes bien sur le site de Microsoft!",
  44.     "Tu est arrivé sur Meetic.fr, fais de belle rencontre!",
  45.     "Tu est sur Skyrock, gere ton blog, et ecoute la radio!",
  46.     "Bienvenue sur Facebook!",
  47.     "Tu est sur AMVAssurance.fr! Portege bien t'es vehicules!",
  48.     "Bienvenue sur Amazon.fr, choisi ce qu'il te plait!",
  49.     "Sur 2xMoinsChere c'est vraiment pas chère!",
  50.     "Tu est sur le site de Norton, un mise a jour peut étre?",
  51.     "Le site est fermée definitivement!",
  52.     "Ce site est en maintenance!",
  53.     "Site introuvable!",
  54.     "Te voila sur Humour.com, mare toi bien!",
  55.     "La connection a été reinitialiser ou le reseau 3G ne passe pas!"
  56.    
  57. };
  58.  
  59. public OnPlayerText(playerid, text[])
  60. {
  61.     if(InChat[playerid] == 1)
  62.     {
  63.         new string[128];
  64.         new name[MAX_PLAYER_NAME];
  65.       GetPlayerName(playerid, name, sizeof(name));
  66.       format(string, sizeof(string), "%s.ini", name );
  67.       new virus = dini_Int(string, "Virus");
  68.       if(virus == 1)
  69.       {
  70.        SendClientMessage(playerid, 0xFFFFFFFF, "Norton: Votre ordinateur est infecté par un virus!");
  71.        return 0;
  72.       }
  73.       new strings[56];
  74.       GetPlayerName(playerid, name, sizeof(name));
  75.         format(strings, sizeof(strings), "[MSN %s] dit: %s", name, text);
  76.        LapUsersMssg(0xDEEE20FF, strings);
  77.        new types[56];
  78.        format(types, sizeof(types), "%s ecrit sur MSN", name);
  79.        ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
  80.         return 0;
  81.    }
  82.     return 1;
  83. }
  84.  
  85. public OnPlayerCommandText(playerid, cmdtext[])
  86. {
  87.    new cmd[256];
  88.    new idx;
  89.    new tmp[256];
  90.    new gMessage[256];
  91.    new Message[128];
  92.    new iName[128];
  93.    new pName[128];
  94.    cmd = strtok(cmdtext, idx);
  95.    if(strcmp(cmd, "/an", true) == 0 || strcmp(cmd, "/annonce", true) == 0)
  96.       {
  97.           new string[128];
  98.            new name[MAX_PLAYER_NAME];
  99.            GetPlayerName(playerid, name, sizeof(name));
  100.           format(string, sizeof(string), "%s.ini", name );
  101.          new virus = dini_Int(string, "Virus");
  102.          if(virus == 1)
  103.          {
  104.           SendClientMessage(playerid, 0xFFFFFFFF, "Norton: Votre ordinateur est infecté par un virus!");
  105.           return 0;
  106.          }
  107.          GetPlayerName(playerid, name, sizeof(name));
  108.           format(string, sizeof(string), "%s.ini", name );
  109.          new haslap = dini_Int(string, "Ordinateur");
  110.          if(haslap == 1)
  111.          {
  112.          new length = strlen(cmdtext);
  113.          while ((idx < length) && (cmdtext[idx] <= ' '))
  114.          {
  115.             idx++;
  116.          }
  117.          new offset = idx;
  118.          new result[64];
  119.          while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  120.          {
  121.             result[idx - offset] = cmdtext[idx];
  122.             idx++;
  123.          }
  124.          result[idx - offset] = EOS;
  125.          if(!strlen(result))
  126.          {
  127.             SendClientMessage(playerid, 0xDEEE20FF, "USAGE: /[an]nonce [TEXT]");
  128.             return 1;
  129.          }
  130.          new pNames[MAX_PLAYER_NAME];
  131.           GetPlayerName(playerid, pNames, sizeof(pNames));
  132.          format(string,sizeof(string), "[Annonce par %s]: %s",pNames, result);
  133.          LapUsersMssg(0xDEEE20FF, result);
  134.           new types[56];
  135.           format(types, sizeof(types), "%s ecrit sur son PC", name);
  136.           ProxDetector(20.0, playerid, types, 0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF,0xDEEE20FF);
  137.          }
  138.           return 1;
  139.         }
  140.    if(strcmp("/email", cmd, true) == 0)
  141.    {
  142.       tmp = strtok(cmdtext,idx);
  143.  
  144.       if(!strlen(tmp) || strlen(tmp) > 5) {
  145.          SendClientMessage(playerid,0xDEEE20FF,"/email (id) (message)");
  146.          return 1;
  147.       }
  148.  
  149.       new id = strval(tmp);
  150.         gMessage = strrest(cmdtext,idx);
  151.  
  152.       if(!strlen(gMessage)) {
  153.          SendClientMessage(playerid,0xDEEE20FF,"/email (id) (message)");
  154.          return 1;
  155.       }
  156.       if(playerid != id)
  157.       {
  158.           new name[MAX_PLAYER_NAME];
  159.          new string[56];
  160.          GetPlayerName(playerid, name, sizeof(name));
  161.           format(string, sizeof(string), "%s.ini", name );
  162.          new haslap = dini_Int(string, "Ordinateur");
  163.          if(haslap == 1)
  164.          {
  165.             GetPlayerName(id,iName,sizeof(iName));
  166.             GetPlayerName(playerid,pName,sizeof(pName));
  167.             format(Message,sizeof(Message),"[Tu a reçu un mail!] %s(%d): %s",iName,id,gMessage);
  168.             SendClientMessage(playerid,0xDEEE20FF,Message);
  169.             format(Message,sizeof(Message),"[Mail envoyé!] %s(%d): %s",pName,playerid,gMessage);
  170.             SendClientMessage(id,0xDEEE20FF,Message);
  171.          }
  172.          else
  173.          {
  174.          
  175.          }
  176.       }
  177.       else
  178.       {
  179.          GetPlayerName(id,iName,sizeof(iName));
  180.          GetPlayerName(playerid,pName,sizeof(pName));
  181.          format(Message,sizeof(Message),"[Tu a un mail!] %s(%d): %s",iName,id,gMessage);
  182.          SendClientMessage(playerid,0xDEEE20FF,Message);
  183.          format(Message,sizeof(Message),"[Mail envoyé!] %s(%d): %s",pName,playerid,gMessage);
  184.          SendClientMessage(id,0xDEEE20FF,Message);
  185.       }
  186.       return 1;
  187.    }
  188.    if (strcmp(cmd, "/aidepc", true) ==0 )
  189.    {
  190.        if(IsPlayerConnected(playerid))
  191.        {
  192.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]:Commande: /credit, /acheterpc, /vendrepc, /email, /seconnecter (a msn)");
  193.             SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]:Commande: /sedeconnecter, /[an]nonce, /internet, /acheternorton");
  194.             SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]:Commande: /lancernorton");
  195.            return 1;
  196.       }
  197.    }
  198.    if (strcmp(cmd, "/internet", true) ==0 )
  199.    {
  200.        if(IsPlayerConnected(playerid))
  201.        {
  202.            new name[MAX_PLAYER_NAME];
  203.          new string[56];
  204.            GetPlayerName(playerid, name, sizeof(name));
  205.           format(string, sizeof(string), "%s.ini", name );
  206.          new virus = dini_Int(string, "Malware");
  207.          if(virus == 1)
  208.          {
  209.           SendClientMessage(playerid, 0xFFFFFFFF, "Norton: Votre PC est infecté par des malware!");
  210.           return 0;
  211.          }
  212.          GetPlayerName(playerid, name, sizeof(name));
  213.           format(string, sizeof(string), "%s.ini", name );
  214.          new haslap = dini_Int(string, "Ordinateur");
  215.          if(haslap == 1)
  216.          {
  217.                new s[128];
  218.              new loginname[MAX_PLAYER_NAME];
  219.              GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
  220.              format(s,sizeof(s),"Bienvenue sur Google %s t\nVous utilisez Mozilla Firefox\nInternet Explorer est fortement deconseillé\nNe telechargez pas trop!\nBonne navigation!",loginname);
  221.              ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Barre d'adresse :",s,"Rechercher","Annuler");
  222.          }
  223.          else
  224.          {
  225.              SendClientMessage(playerid, 0xDEEE20FF, "Tu n'a pas de Pc Portable!");
  226.          }
  227.       }
  228.    }
  229.    if (strcmp(cmd, "/lancernorton", true) ==0 )
  230.    {
  231.        if(IsPlayerConnected(playerid))
  232.        {
  233.           new name[MAX_PLAYER_NAME];
  234.          new string[56];
  235.          GetPlayerName(playerid, name, sizeof(name));
  236.           format(string, sizeof(string), "%s.ini", name );
  237.          new hasanti = dini_Int(string, "AntiVirus");
  238.          if(hasanti == 1)
  239.          {
  240.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows 7]: Lancement du CD......");
  241.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows 7]: Norton Anti-Virus chargé..");
  242.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows 7]: Installation de l'antivirus...");
  243.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Lancement d'une analyse...");
  244.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Analyse en cours...");
  245.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Analyse terminée!");
  246.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Suppression des virus, malware et autre...");
  247.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Suppression terminé!");
  248.              SendClientMessage(playerid, 0xDEEE20FF, "[Norton Anti-Virus]: Merci d'utiliser Norton Anti-Virus, A bientôt !");
  249.              dini_IntSet(string, "Virus", 0);
  250.          }
  251.          else
  252.          {
  253.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows 7]: Tu n'a pas Norton!");
  254.          }
  255.       }
  256.    }
  257.    if (strcmp(cmd, "/sedeconnecter", true) ==0 )
  258.    {
  259.        if(IsPlayerConnected(playerid))
  260.        {
  261.            new name[MAX_PLAYER_NAME];
  262.          new string[56];
  263.          GetPlayerName(playerid, name, sizeof(name));
  264.           format(string, sizeof(string), "%s.ini", name );
  265.          new haslap = dini_Int(string, "Ordinateur");
  266.          if(haslap == 1)
  267.          {
  268.              format(string, sizeof(string), "%s s'est deconnecté de msn.", name );
  269.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows Live]: Tu t'es deconnecté de msn! pour te reconnecter fais /seconnecter.");
  270.                 LapUsersMssg(0xDEEE20FF, string);
  271.                 InChat[playerid] = 0;
  272.          }
  273.          else
  274.          {
  275.              SendClientMessage(playerid, 0xDEEE20FF, "Tu n'a pas de Pc Portable!");
  276.          }
  277.       }
  278.    }
  279.    if (strcmp(cmd, "/seconnecter", true) ==0 )
  280.    {
  281.        if(IsPlayerConnected(playerid))
  282.        {
  283.            new name[MAX_PLAYER_NAME];
  284.          new string[56];
  285.          GetPlayerName(playerid, name, sizeof(name));
  286.           format(string, sizeof(string), "%s.ini", name );
  287.          new haslap = dini_Int(string, "Ordinateur");
  288.          if(haslap == 1)
  289.          {
  290.              format(string, sizeof(string), "%s s'est connecté!!", name );
  291.              SendClientMessage(playerid, 0xDEEE20FF, "[Windows Live]: Appuye sur F6 ou T pour parler sur Msn!");
  292.                 LapUsersMssg(0xDEEE20FF, string);
  293.                 InChat[playerid] = 1;
  294.          }
  295.          else
  296.          {
  297.              SendClientMessage(playerid, 0xDEEE20FF, "Tu n'as pas de Pc Portable!");
  298.          }
  299.        }
  300.    }
  301.    if (strcmp(cmd, "/credit", true) ==0 )
  302.    {
  303.        if(IsPlayerConnected(playerid))
  304.        {
  305.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]: Pc Portable systeme modifié par Darkdi4bl0");
  306.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]: Les marque utilisée sont :");
  307.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]: Windows®, Norton®, MSN®.");
  308.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]: Merci d'avoir consulté les credit!");
  309.            SendClientMessage(playerid, 0xDEEE20FF, "[ Pc Portable ]: Si tu a besoin d'aide sur mon systeme : /aidepc");
  310.            return 1;
  311.       }
  312.    }
  313.    if (strcmp(cmd, "/acheternorton", true) ==0 )
  314.    {
  315.        if(IsPlayerConnected(playerid))
  316.        {
  317.            if(GetPlayerMoney(playerid) >= 500)
  318.            {
  319.                if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
  320.             {
  321.                 new name[MAX_PLAYER_NAME];
  322.                   new string[56];
  323.                   GetPlayerName(playerid, name, sizeof(name));
  324.                   format(string, sizeof(string), "%s.ini", name );
  325.                 GivePlayerMoney(playerid, -5500);
  326.                 dini_IntSet(string, "AntiVirus", 1);
  327.                   SendClientMessage(playerid, 0xDEEE20FF, "Tu a acheter un anti-virus: Norton!");
  328.             }
  329.             else
  330.                {
  331.                    SendClientMessage(playerid, 0xDEEE20FF, "Tu n'est pas dans un 24/7");
  332.             }
  333.             }
  334.            else
  335.            {
  336.                SendClientMessage(playerid, 0xDEEE20FF, "Tu a payer norton 500$");
  337.            }
  338.       }
  339.    }
  340.    if (strcmp(cmd, "/acheterpc", true) ==0 )
  341.    {
  342.        if(IsPlayerConnected(playerid))
  343.        {
  344.            if(GetPlayerMoney(playerid) >= 3500)
  345.            {
  346.                if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
  347.             {
  348.                new name[MAX_PLAYER_NAME];
  349.                new string[56];
  350.                GetPlayerName(playerid, name, sizeof(name));
  351.                printf("%s a acheté un nouveau PC!", name);
  352.                format(string, sizeof(string), "%s.ini", name );
  353.                dini_IntSet(string, "Ordinateur", 1);
  354.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Voila c'est un magnifique ordinateur!");
  355.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Le processeur est un Intel Core 2 Duo E7500 de 2.5GHz");
  356.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Le disque dur a une capacité de 320Go et la memoire est de 3Go");
  357.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: La memoire graphique est de 512Mo dedié, il a la Wi-Fi, le bluetooth");
  358.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Et j'oubliais, il tourne sous Windows 7 Ultimate!");
  359.                SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: c'est un très bon achat, Amusez vous bien!");
  360.                SendClientMessage(playerid, 0xDEEE20FF, "Tu a acheté ton nouvel ordinateur portable!");
  361.                SendClientMessage(playerid, 0xDEEE20FF, "Il est tout beau, tout neuf! La classe!");
  362.                SendClientMessage(playerid, 0xDEEE20FF, "Tape /aidepc pour lire la notice en ligne!");
  363.                GivePlayerMoney(playerid, -3500);//Prix d'achat du pc (ne pas enlever le -)
  364.                }
  365.                else
  366.                {
  367.                    SendClientMessage(playerid, 0xDEEE20FF, "Tu n'est pas dans un 24/7");
  368.             }
  369.            }
  370.            else
  371.            {
  372.                SendClientMessage(playerid, 0xDEEE20FF, "Tu a payé ton Ordinateur 3500$!");
  373.            }
  374.       }
  375.    }
  376.    if (strcmp(cmd, "/vendrepc", true) ==0 )
  377.    {
  378.        if(IsPlayerConnected(playerid))
  379.        {
  380.            new name[MAX_PLAYER_NAME];
  381.             new string[56];
  382.              GetPlayerName(playerid, name, sizeof(name));
  383.            format(string, sizeof(string), "%s.ini", name );
  384.             new haslap = dini_Int(string, "Ordinateur");
  385.          if(haslap == 1)
  386.          {
  387.              if (PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53) || PlayerToPoint(100, playerid, -22.1740,-138.6172,1003.5469))//centerpoint 24-7
  388.             {
  389.                printf("%s a vendu son ordinateur!", name);
  390.                dini_IntSet(string, "Ordinateur", 0);
  391.                SendClientMessage(playerid, 0xDEEE20FF, "Tu a vendu ton ordinateur.");
  392.                 SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Tu me le ramène? Il te plait pas?");
  393.                 SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: Enfin bref c'est ton choix !");
  394.                 SendClientMessage(playerid, 0xDEEE20FF, "Vendeur: je te le reprend 1500$.");
  395.                GivePlayerMoney(playerid, 1500);// Prix de vente du PC
  396.                }
  397.                else
  398.                {
  399.                    SendClientMessage(playerid, 0xDEEE20FF, "Tu n'est pas dans un 24/7.");
  400.             }
  401.          }
  402.          else
  403.          {
  404.                SendClientMessage(playerid, 0xDEEE20FF, "Tu n'a pas de Pc portable!");
  405.            }
  406.       }
  407.    }
  408.    return 0;
  409. }
  410.  
  411.  
  412. public OnPlayerConnect(playerid)
  413. {
  414.    new string[50];
  415.    new name[MAX_PLAYER_NAME];
  416.     GetPlayerName(playerid, name, sizeof(name));
  417.     format(string, sizeof(string), "%s.ini", name );
  418.     if(!dini_Exists(string))
  419.    {
  420.        dini_Create(string);
  421.        dini_Set(string, "Ordinateur", "0");
  422.        dini_IntSet(string, "Virus", 0);
  423.        printf("%s ouvre son ordinateur.", name);
  424.    }
  425.    else
  426.    {
  427.         dini_Get(string, "Ordinateur");
  428.         dini_Get(string, "Virus");
  429.         printf("%s a chargé son compte d'utilisateur", name);
  430.    }
  431.     return 1;
  432. }
  433.  
  434. public LapUsersMssg(color,const string[])
  435. {
  436.    for(new i = 0; i < MAX_PLAYERS; i++)
  437.    {
  438.       if(IsPlayerConnected(i))
  439.       {
  440.          new name[MAX_PLAYER_NAME];
  441.          new strings[56];
  442.          GetPlayerName(i, name, sizeof(name));
  443.           format(strings, sizeof(strings), "%s.ini", name );
  444.          new haslap = dini_Int(strings, "Ordinateur");
  445.          if(haslap == 1 && InChat == 1)
  446.          {
  447.              SendClientMessage(i, color, string);
  448.              PlayerPlaySound(i,1085,0.0,0.0,0.0);
  449.          }
  450.       }
  451.    }
  452.    return 1;
  453. }
  454.  
  455. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  456. {
  457.    if(IsPlayerConnected(playerid))
  458.    {
  459.       new Float:posx, Float:posy, Float:posz;
  460.       new Float:oldposx, Float:oldposy, Float:oldposz;
  461.       new Float:tempposx, Float:tempposy, Float:tempposz;
  462.  
  463.       GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  464.       //radi = 2.0; //Trigger Radius
  465.       for(new i = 0; i < MAX_PLAYERS; i++)
  466.       {
  467.          if(IsPlayerConnected(i))
  468.          {
  469.                GetPlayerPos(i, posx, posy, posz);
  470.                tempposx = (oldposx -posx);
  471.                tempposy = (oldposy -posy);
  472.                tempposz = (oldposz -posz);
  473.                //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  474.                if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  475.                {
  476.                    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
  477.                    {
  478.                      SendClientMessage(i, col1, string);
  479.                   }
  480.                }
  481.                else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  482.                {
  483.                         if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
  484.                         {
  485.                      SendClientMessage(i, col2, string);
  486.                   }
  487.                }
  488.                else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  489.                {
  490.                    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
  491.                    {
  492.                      SendClientMessage(i, col3, string);
  493.                   }
  494.                }
  495.                else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  496.                {
  497.                    if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
  498.                    {
  499.                      SendClientMessage(i, col4, string);
  500.                   }
  501.                }
  502.                else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  503.                {
  504.                         if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
  505.                         {
  506.                      SendClientMessage(i, col5, string);
  507.                   }
  508.                }
  509.        }
  510.             else
  511.             {
  512.                SendClientMessage(i, col1, string);
  513.             }
  514.       }
  515.    }//not connected
  516.    return 1;
  517. }
  518.  
  519. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  520. {
  521.     if(IsPlayerConnected(playerid))
  522.    {
  523.       new Float:oldposx, Float:oldposy, Float:oldposz;
  524.       new Float:tempposx, Float:tempposy, Float:tempposz;
  525.       GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  526.       tempposx = (oldposx -x);
  527.       tempposy = (oldposy -y);
  528.       tempposz = (oldposz -z);
  529.       //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  530.       if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  531.       {
  532.          return 1;
  533.       }
  534.    }
  535.    return 0;
  536. }
  537.  
  538. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  539. {
  540.     if(dialogid == 1)
  541.     {
  542.         if(!response) SendClientMessage(playerid, 0xFFFFFFFF, "Vous quittez!");
  543.         new message[196];
  544.         format(message, sizeof(message), "Mozilla Firefox - Chargement %s........", inputtext);
  545.         SendClientMessage(playerid, 0xFFFFFFFF, message);
  546.         new randMSG = random(sizeof(RandomMSG));
  547.       SendClientMessage(playerid, 0xFFFFFFFF, RandomMSG[randMSG]);
  548.       new Rand = random(1);
  549.         new name[MAX_PLAYER_NAME];
  550.          new string[56];
  551.         GetPlayerName(playerid, name, sizeof(name));
  552.           format(string, sizeof(string), "%s.ini", name );
  553.       dini_IntSet(string, "Virus", Rand);
  554.         return 1;
  555.     }
  556.     return 0;
  557. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement