Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - aledark24

Pages: 1 [2]
16
Snippet Showroom / [new command] rob in the street xD
« on: December 26, 2012, 08:03:59 pm »
[pawn]new Billetera[MAX_PLAYERS];[/pawn]

[pawn]     else if (strcmp(cmd, "rob", true) == 0) {
      tmp = strtok( cmdtext, idx ); new plr = FindPlayerIDFromString( tmp );
            if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c rob [Nick/ID]" );
      else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else if ( !IsPlayerSpawned( plr ) ) SendClientMessagef( playerid, COLOR_GREEN, "Error: %s does not spawned!", gPlayers[ plr ] );
       else if(!NeedPlayerInArea(playerid,-1120.6895,-809.5638,-693.6281,-137.1244)) SendClientMessage(playerid, GREEN,"[Error] - You can only steal in an area near the bank");
       else {
       
              new Float:RX, Float:RY, Float:RZ, szMsg[256];
                  GetPlayerPos(playerid,RX,RY,RZ);
                  if(PlayerToPoint(3.0,plr,RX,RY,RZ))
                        format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
                  TogglePlayerControllable(playerid,0);
                  IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
         }
      return 1;
   }[/pawn]

HEM is not finish yet because contain one bug if the player "plr" not is in the area = disccount money xD
 

Stock AND public

[pawn]
//==============================================================================
stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
//==============================================================================
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
//==============================================================================
public robando() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Billetera == 0) {
       }
       if(Billetera == 1) {
           SendClientMessage(i,COLOR_YELLOW,"You have been seen, Escape immediately!");
           TogglePlayerControllable(i,1);

  }
      }
      }
}
//==============================================================================[/pawn]

Only rob in this area



17
ShowRoom (pawn) / New Rob bank Command
« on: December 19, 2012, 07:03:23 pm »

[pawn]new Maletin[MAX_PLAYERS];[/pawn]

[pawn]Put this in the public OnPlayerDisconnect(playerid, reason)

Maletin[playerid] = 0;

Put this in public OnPlayerSpawn(playerid,classid,teamid)
Maletin[playerid] = 0;[/pawn]

[pawn]
                  else if (strcmp(cmd, "robbank", true) == 0) {
{
           tmp = strtok(cmdtext, idx);
new szMsg[256], plr;

      if(Maletin[playerid] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You've robbed the bank! You can not steal it again!");
}
else if(!NeedPlayerInArea(playerid,-945.0223,-938.2779,-346.0285,-341.7365)) SendClientMessage(playerid, GREEN,"[Error] - You must be in the bank vault to steal it!");
else {
    GameTextForPlayerBottom(playerid,"~y~ >>>>");
    TogglePlayerControllable(playerid,0);
   SetTimer("roboenprogreso", 9000, false);
    SendClientMessage(playerid, COLOR_YELLOW,"Right now you're robbing the bank");
   IncPlayerHandCash(playerid,400);
    SetWantedLevel(playerid,6);
         format( szMsg, sizeof( szMsg ), "%s is robbing the bank, the police has been informed", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll( COLOR_YELLOW, szMsg );
    SetPlayerMarker(playerid,15);
   SetPlayerSkin(playerid,0);
   SetPlayerSkin(playerid,129);
   ToggleGreenScanlinesForPlayer(playerid,1);
   ToggleWidescreenForPlayer(playerid,1);
   Maletin[playerid] = 1;
      }
  }

      return 1;
   }
[/pawn]

Public and stock

[pawn]//==============================================================================
stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
//==============================================================================
public roboenprogreso() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Maletin == 1) {
           SendClientMessage(i,COLOR_YELLOW,"You have been seen by security cameras, Escape immediately!");
           TogglePlayerControllable(i,1);
           ToggleGreenScanlinesForPlayer(i,0);
           ToggleWidescreenForPlayer(i,0);
      }
  }
      }
}
//==============================================================================
[/pawn]


Photos






You can not rob the bank two times in a row unless you die or disconnect



Do you like this command??


18
Snippet Showroom / Buy weapons in all Ammu-Nation
« on: November 17, 2012, 06:59:19 pm »
Traslate to english, i not have time  :o :P :D


[pawn] else if(strcmp(cmdtext, "armas", true) == 0) {
       SendClientMessage(playerid,COLOR_YELLOW ,"-----------Compra de armas-----------");
       SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una m60 /c m60, Para comprar una ingrams /c ingrams");
       SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una tec /c tec, Para comprar un francotirador /c laser");
       SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar chaleco antibalas /c chaleco, Para comprar una shotgun /c shotgun");
       SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una m4 /c m4, Para comprar una stubby /c bb");
        SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar una ruger, /c ruger, Para comprar granadas, /c granadas");
        SendClientMessage(playerid,COLOR_YELLOW ,"Para comprar katana, /c katana");
      SendClientMessage(playerid,COLOR_YELLOW ,"---Puedes comprar en cualquier Ammunation---");
       return 1;
       }
   

        else if(strcmp(cmdtext, "chaleco", true) == 0) {
      if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)) {
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste chaleco!");
           SetPlayerArmour(playerid,99);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar chaleco!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

         else if(strcmp(cmdtext, "laser", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Francotirador!");
           SetPlayerWeapon(playerid,29,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Francotirador!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

            else if(strcmp(cmdtext, "bb", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Stubby shotgun!");
           SetPlayerWeapon(playerid,21,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Francotirador!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

            else if(strcmp(cmdtext, "m4", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste M4!");
           SetPlayerWeapon(playerid,26,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar M4!");
           }
         }
           else
           {
          SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

               else if(strcmp(cmdtext, "tec", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Tec9!");
           SetPlayerWeapon(playerid,22,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Tec9!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                  else if(strcmp(cmdtext, "ingrams", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Ingrams!");
           SetPlayerWeapon(playerid,24,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Ingrams!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }


               else if(strcmp(cmdtext, "ruger", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Ruger!");
           SetPlayerWeapon(playerid,27,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Ruger!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                  else if(strcmp(cmdtext, "shotgun", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Shotgun!");
           SetPlayerWeapon(playerid,19,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Shotgun!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                     else if(strcmp(cmdtext, "granadas", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Shotgun!");
           SetPlayerWeapon(playerid,12,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Granadas!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                  else if(strcmp(cmdtext, "vida", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Vida!");
           SetPlayerHealth(playerid,100.0);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Vida!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                     else if(strcmp(cmdtext, "katana", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste Katana!");
           SetPlayerWeapon(playerid,10,1);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar Katana!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }

                     else if(strcmp(cmdtext, "m60", true) == 0) {
       if(PlayerToPoint(5, playerid,364.11175, 1059.95654, 19.19139) || PlayerToPoint(5, playerid,-63.83909, -1477.56042, 10.44908) || PlayerToPoint(5, playerid,-673.11517, 1204.90148, 11.10896)){
           new cash = GetPlayerMoney(playerid);
             if(cash >= 1000) {
           SendClientMessage(playerid,COLOR_YELLOW,"Compraste M60!");
           SetPlayerWeapon(playerid,32,1000);
           DecPlayerHandCash(playerid,1000);
          }
           if(cash < 999) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $1000 para comprar M60!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Debes estar en Ammu-Nation");
           }
       return 1;
   }[/pawn] 

DO YOU LIKE MY COMMANDS?? GIVE ME THANKS OR CREDITS IN YOU SCRIPT.. AND I CREATE MORE COMMANDS FOR FUN

19
Snippet Showroom / Complete Food system by aledark24
« on: November 10, 2012, 05:07:39 pm »
Special credits for Yonni Suarez "nice idea men"
Warning "sorry for my bad english"

[pawn]/*This food system is for all script,warchief-gups or fc-or from 0*/




#define COLOR_PINK             0xFFC0CBAA
#define COLOR_GREEN         0xE8941EFF
#define COLOR_YELLOW      0xFFFF00AA


new Cafe[MAX_PLAYERS];
new Pizza[MAX_PLAYERS];
new Bebida[MAX_PLAYERS];

//===============================================================================
public OnPlayerDisconnect(playerid, reason)
{
    Cafe[playerid] = 0;
    Pizza[playerid] = 0;
    Bebida[playerid] = 0;
   return 1;
}
//===============================================================================
public OnPlayerDeath(playerid,killerid,reason)
{
    Cafe[playerid] = 0;
    Pizza[playerid] = 0;
    Bebida[playerid] = 0;
    return 1;
}
[/pawn]


[pawn]//===============================================================================

/* This is for script from 0*/

public OnPlayerCommandText(playerid,cmdtext[])
{
   if(strcmp(cmdtext, "Foods", true) == 0) {
       SendClientMessage(playerid,COLOR_YELLOW ,"-----------Foods-----------");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyp for buy a pizza ");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyb for buy a drink");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyc for buy a coffee");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c eatp or /c drinkb or /c drinkc for eat or drink the foods");
       return 1;
       }   
      
   else if(strcmp(cmdtext, "buyp", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Pizza[playerid] == 1) {
           SendClientMessage(playerid,COLOR_YELLOW,"For eat a pizza type /c eatp");   
           }
           if(Pizza[playerid] == 0) {
           if(cash >= 150) {
           SendClientMessage(playerid,COLOR_YELLOW,"You buy a pizza!");
           Pizza[playerid] = 1;
           SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 150);
           }
           if(cash < 100) {
           SendClientMessage(playerid,COLOR_YELLOW,"Need more money, you need $150!");
           }
           }
           }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Need go to the pizzeria!");
           }
       return 1;
   }
   
   else if(strcmp(cmdtext, "buyb", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Bebida[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"For drink a bebida type /c drinkb");
         }
           if(Bebida[playerid] == 0) {
               if(cash >= 150) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a drink");
               Bebida[playerid] = 1;
               SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 10);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money,need $150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Need go to the pizzeria!");
         }
      return 1;
   }
   
   else if(strcmp(cmdtext, "buyc", true) == 0) {
      if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,-1169.71337, -616.97027, 11.82830) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Cafe[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"To drink coffee type /c drinkc");
         }
           if(Cafe[playerid] == 0) {
               if(cash >= 150) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a coffee!");
               Cafe[playerid] = 1;
               SetPlayerMoney(playerid,GetPlayerMoney(playerid) - 25);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money,need 150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Go to the cafeteria Robina or the pizza place!");
         }
      return 1;
   }

 else if(strcmp(cmdtext, "eatp", true) == 0) {       
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Pizza[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Not have a pizza!");
           }
      if(Pizza[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~E~o~O~h~A~w~T~o~I~h~N~w~G ~h~.~w~.~o~.");
  SendClientMessage(playerid,COLOR_PINK,"[PIZZA]:You eat a pizza and recovery you energy!");   
  SetTimer("comiendopizza", 5000, false);
          Pizza[playerid] = 0;
          }
       return 1;
       }

 else if(strcmp(cmdtext, "drinkc", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Cafe[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"buy a coffee first!!");
           }
      if(Cafe[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:You drink you coffee and recovery energy!");
  SetTimer("tomandocafe", 5000, false);
          Cafe[playerid] = 0;
          }
       return 1;
       }
 else if(strcmp(cmdtext, "drinkb", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Bebida[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Buy drink first!!");
           }
      if(Bebida[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:You drink and recovery you energy!");
  SetTimer("tomandobebida", 5000, false);
          Bebida[playerid] = 0;
          }
       return 1;
       } [/pawn]
      
[pawn]       /* ------------- For script warchief  ------------ */
      
  public OnPlayerCommandText(playerid,cmdtext[])
{
      
   if(strcmp(cmdtext, "Foods", true) == 0) {
       SendClientMessage(playerid,COLOR_YELLOW ,"-----------Foods-----------");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyp for buy a pizza ");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyb for buy a drink");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyc for buy a coffee");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c eatp or /c drinkb or /c drinkc for eat or drink the foods");
       return 1;
       }
      
          else if(strcmp(cmdtext, "buyp", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Pizza[playerid] == 1) {
           SendClientMessage(playerid,COLOR_YELLOW,"For eat a pizza type /c eatp");
           }
           if(Pizza[playerid] == 0) {
           if(cash >= 150) {
           SendClientMessage(playerid,COLOR_YELLOW,"You bought a pizza");
           Pizza[playerid] = 1;
           DecPlayerCash(playerid,150);
           }
           if(cash < 150) {
           SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
           }
           }
           }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Go to the pizzeria for buy a pizza");
           }
       return 1;
   }
   else if(strcmp(cmdtext, "buyb", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Bebida[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"For drink type /c drinkb");
         }
           if(Bebida[playerid] == 0) {
               if(cash >= 150) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a drink");
               Bebida[playerid] = 1;
               DecPlayerCash(playerid,150);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Go to the pizzeria");
         }
      return 1;
   }
   else if(strcmp(cmdtext, "buyc", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,-1169.71337, -616.97027, 11.82830) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Cafe[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"For drink a coffee, type /c drinkc");
         }
           if(Cafe[playerid] == 0) {
               if(cash >= 25) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a coffee");
               Cafe[playerid] = 1;
               DecPlayerCash(playerid,150);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Go to Cafeteria Robina or The pizzeria for buy a coffee!");
         }
      return 1;
   }
   
 else if(strcmp(cmdtext, "eatp", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Pizza[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"not have a pizza");
           }
      if(Pizza[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~E~o~O~h~A~w~T~o~I~h~N~w~G ~h~.~w~.~o~.");
  SendClientMessage(playerid,COLOR_PINK,"[Eating]:Eating pizza!");
  SetTimer("comiendopizza", 5000, false);
          Pizza[playerid] = 0;
          }
       return 1;
       }

 else if(strcmp(cmdtext, "drinkc", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Cafe[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Need buy a coffee!!");
           }
      if(Cafe[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:You drink a coffee and recovery energy!");
  SetTimer("tomandocafe", 5000, false);
          Cafe[playerid] = 0;
          }
       return 1;
       }
 else if(strcmp(cmdtext, "drinkb", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Bebida[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Not have a drink!!");
           }
      if(Bebida[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
 GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:Drink and recovery energy!");
  SetTimer("tomandobebida", 5000, false);
          Bebida[playerid] = 0;
          }
       return 1;
       }    [/pawn]
        
      
[pawn]       /* ------- For script gups or Fight City ------- */
      
      
  public OnPlayerCommandText(playerid,cmdtext[])
{
   
   if(strcmp(cmdtext, "Foods", true) == 0) {
       SendClientMessage(playerid,COLOR_YELLOW ,"-----------Foods-----------");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyp for buy a pizza ");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyb for buy a drink");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c buyc for buy a coffee");
       SendClientMessage(playerid,COLOR_YELLOW ,"Whrite /c eatp or /c drinkb or /c drinkc for eat or drink the foods");
       return 1;
       }
   
          else if(strcmp(cmdtext, "buyp", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Pizza[playerid] == 1) {
           SendClientMessage(playerid,COLOR_YELLOW,"For eat a pizza type /c eatp");
           }
           if(Pizza[playerid] == 0) {
           if(cash >= 150) {
           SendClientMessage(playerid,COLOR_YELLOW,"You bought a pizza");
           Pizza[playerid] = 1;
           DecPlayerHandCash(playerid,150);
           }
           if(cash < 100) {
           SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
           }
           }
           }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Go to the pizzeria for buy a pizza");
           }
       return 1;
   }
   else if(strcmp(cmdtext, "buyb", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Bebida[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"For drink type /c drinkb");
         }
           if(Bebida[playerid] == 0) {
               if(cash >= 150) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a drink");
               Bebida[playerid] = 1;
               DecPlayerHandCash(playerid,150);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Go to the pizzeria");
         }
      return 1;
   }
   else if(strcmp(cmdtext, "buyc", true) == 0) {
       if(PlayerToPoint(8, playerid,-1048.77099, 82.13945, 12.43262 ) || PlayerToPoint(8, playerid,-895.97473, 798.99871, 12.26343) || PlayerToPoint(8, playerid,-1169.71337, -616.97027, 11.82830) || PlayerToPoint(8, playerid,425.24963, 81.22541, 12.06054)) {
           new cash = GetPlayerMoney(playerid);
           if(Cafe[playerid] == 1) {
            SendClientMessage(playerid,COLOR_YELLOW,"For drink a coffee, type /c drinkc");
         }
           if(Cafe[playerid] == 0) {
               if(cash >= 25) {
               SendClientMessage(playerid,COLOR_YELLOW,"You bought a coffee");
               Cafe[playerid] = 1;
               DecPlayerHandCash(playerid,150);
               }
               if(cash < 100) {
               SendClientMessage(playerid,COLOR_YELLOW,"Need more money, need $150!");
               }
         }
         }
         else
         {
         SendClientMessage(playerid,COLOR_GREEN,"Go to Cafeteria Robina or The pizzeria for buy a coffee!");
         }
      return 1;
   }
   
 else if(strcmp(cmdtext, "eatp", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Pizza[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"not have a pizza");
           }
      if(Pizza[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~E~o~O~h~A~w~T~o~I~h~N~w~G ~h~.~w~.~o~.");
  SendClientMessage(playerid,COLOR_PINK,"[Eating]:Eating pizza!");
  SetTimer("comiendopizza", 5000, false);
          Pizza[playerid] = 0;
          }
       return 1;
       }

 else if(strcmp(cmdtext, "drinkc", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Cafe[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Need buy a coffee!!");
           }
      if(Cafe[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
 GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:You drink a coffee and recovery energy!");
  SetTimer("tomandocafe", 5000, false);
          Cafe[playerid] = 0;
          }
       return 1;
       }
 else if(strcmp(cmdtext, "drinkb", true) == 0) {
       new Float:Health;
       GetPlayerHealth(playerid,Health);
       if(Bebida[playerid] == 0) {
           SendClientMessage(playerid,COLOR_GREEN,"Not have a drink!!");
           }
      if(Bebida[playerid] == 1) {
      TogglePlayerControllable(playerid,0);
  GameTextForPlayer(playerid,"~w~.~o~.~h~. ~w~D~o~R~h~~I~h~N~w~K~h~I~w~N~o~G~w~.");
  SendClientMessage(playerid,COLOR_RED,"[Drink]:Drink and recovery energy!");
  SetTimer("tomandobebida", 5000, false);
          Bebida[playerid] = 0;
          }
       return 1;
       }

[/pawn]



[pawn]        
//===============================================================================
public comiendopizza(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if (IsPlayerConnected(i)) {
   TogglePlayerControllable(i,1);
   SetPlayerHealth(i,100);
   SendClientMessage(playerid,COLOR_YELLOW,"You eating a pizza and recovery you energy");
 }

       }
}
//===============================================================================
public tomandocafe(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if (IsPlayerConnected(i)) {
   TogglePlayerControllable(i,1);
   SetPlayerHealth(i,100);
   SendClientMessage(playerid,COLOR_YELLOW,"You drinking a coffee and recovery you energy");
 }

       }
}
//===============================================================================
public tomandobebida(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if (IsPlayerConnected(i)) {
   TogglePlayerControllable(i,1);
   SetPlayerHealth(i,100);
   SendClientMessage(playerid,COLOR_YELLOW,"You drinking a drink and recovery you energy");
 }

       }
}
//==============================================================================
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
//==============================================================================


/* This commands is for food system, you need go to any pizzeria in the city for buy, and for eat or drink you type the command everywhere*/

/* BY ALEDARK24  FOR ROLEPLAY SCRIPTS , DO YOU LIKE THIS COMMANDS ¿¿?? GIVEME THANKS OR CREDITS IN YOU SERVER  */[/pawn]

20
Snippet Showroom / Repair The car in all Pay N spray
« on: November 03, 2012, 08:13:47 pm »
Modificated 17-11-12


This commands is for Warchief          



[pawn]        /*Comando para reparar vehiculo en Pay N spray */
           else if(strcmp(cmdtext, "reparar", true) == 0) {
       if(PlayerToPoint(6, playerid,-870.66674, -118.24742, 10.65336 ) || PlayerToPoint(6, playerid,-912.51165, -1268.10986, 11.86920) || PlayerToPoint(6, playerid,-11.25934, -1258.25854, 10.23682) || PlayerToPoint(6, playerid,327.91986, 430.80700, 11.16345)) {


           new cash = GetPlayerMoney(playerid);
             if(cash >= 500) {
           SendClientMessage(playerid,COLOR_YELLOW,"Has reparado tu vehiculo");
           SetVehicleTyre(GetPlayerVehicleID(playerid), 1);
          SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
           DecPlayerCash(playerid,500);
          }
           if(cash < 499) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $500 para reparar el vehiculo!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Solo se repara en Pay N Spray");
           }
       return 1;
   } [/pawn]

This commands is for another script

[pawn] else if(strcmp(cmdtext, "reparar", true) == 0) {
       if(PlayerToPoint(6, playerid,-870.66674, -118.24742, 10.65336 ) || PlayerToPoint(6, playerid,-912.51165, -1268.10986, 11.86920) || PlayerToPoint(6, playerid,-11.25934, -1258.25854, 10.23682) || PlayerToPoint(6, playerid,327.91986, 430.80700, 11.16345)) {


           new cash = GetPlayerMoney(playerid);
             if(cash >= 500) {
           SendClientMessage(playerid,COLOR_YELLOW,"Has reparado tu vehiculo");
           SetVehicleTyre(GetPlayerVehicleID(playerid), 1);
          SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
           DecPlayerHandCash(playerid,500);
          }
           if(cash < 499) {
           SendClientMessage(playerid,COLOR_YELLOW,"Necesitas mas dinero!Necesitas $500 para reparar el vehiculo!");
           }
         }
           else
           {
           SendClientMessage(playerid,COLOR_YELLOW,"Solo se repara en Pay N Spray");
           }
       return 1;
   }  [/pawn]


this is the public

[pawn] //==============================================================================
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
//============================================================================== [/pawn]
 

Pages: 1 [2]