[FilterScript] Weap TextDraw
#1

Sup

Another Release;

Weapon TextDraw

Simple And Good For TDM, DM Servers!

You Use /arms

And TEXTDRAW Will Pop Out



Screeny's :







Thank Ya



U need code right?





Pastebin;


http://pastebin.com/zevtHXaW



Those Who Cant Access Pastebin:



PHP код:
// Weapon Textdraw by Me eMapper.
// I Hope YOu'll Enjoy It
// Dont Steal Credits If You Would Go Fuck You're Self
// PacMan game rulze :D
// Comment/Rate It Ya Guys
#include <a_samp>
new Text:MenuText:Infoqarms[MAX_PLAYERS], menuArms[MAX_PLAYERS], pickup[6];
forward Arms(playerid);
public 
OnGameModeInit()
{
    
Menu TextDrawCreate(112.000000113.000000"~n~Weapon Menu~n~~n~9mm~n~Shotgun~n~MP5~n~AK-47~n~M4~n~Sawn-off~n~_");
    
TextDrawAlignment(Menu2);
    
TextDrawBackgroundColor(Menu255);
    
TextDrawFont(Menu2);
    
TextDrawLetterSize(Menu0.3600001.000000);
    
TextDrawColor(Menu, -1);
    
TextDrawSetOutline(Menu1);
    
TextDrawSetProportional(Menu1);
    
TextDrawUseBox(Menu1);
    
TextDrawBoxColor(Menu336870460);
    
TextDrawTextSize(Menu856.000000178.000000);
    
Info TextDrawCreate(256.000000127.000000"INFORMATION~n~~n~Name X~n~ID X~n~ Price $X");
    
TextDrawAlignment(Info2);
    
TextDrawBackgroundColor(Info255);
    
TextDrawFont(Info2);
    
TextDrawLetterSize(Info0.3300000.899999);
    
TextDrawColor(Info, -1);
    
TextDrawSetOutline(Info1);
    
TextDrawSetProportional(Info1);
    
TextDrawUseBox(Info1);
    
TextDrawBoxColor(Info336870460);
    
TextDrawTextSize(Info42.000000, -110.000000);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp("/arms"cmdtexttrue) == 0)
    {
        
qarms[playerid] = 0;
        
menuArms[playerid] = 1;
        
TextDrawShowForPlayer(playeridMenu);
        
TextDrawShowForPlayer(playeridInfo);
        return 
1;
    }
    return 
0;
}
public 
Arms(playerid)
{
    new 
Float:X,Float:Y,Float:Z;
    
GetPlayerPos(playerid,X,Y,Z);
    if(
qarms[playerid] == 1)
       {
           
DestroyPickup(pickup[1]);
           
DestroyPickup(pickup[2]);
           
DestroyPickup(pickup[3]);
        
DestroyPickup(pickup[4]);
          
DestroyPickup(pickup[5]);
           
pickup[0] = CreatePickup(3482X+2,Y+2,ZGetPlayerVirtualWorld(playerid));
         
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~~g~9mm~n~~w~Shotgun~n~MP5~n~AK-47~n~M4~n~Sawn-off~n~_");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name 9MM~n~ID 22~n~Price $50");
       }
     if(
qarms[playerid] == 2)
       {
           
DestroyPickup(pickup[0]);
           
DestroyPickup(pickup[2]);
           
DestroyPickup(pickup[3]);
           
DestroyPickup(pickup[4]);
           
DestroyPickup(pickup[5]);
           
pickup[1] = CreatePickup(3492X+2,Y+2,Z,GetPlayerVirtualWorld(playerid));
         
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~9mm~n~~g~Shotgun~n~~w~MP5~n~AK-47~n~M4~n~Sawn-off~n~_");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name Shotgun~n~ID 25~n~Price $250");
       }
      if(
qarms[playerid] == 3)
       {
           
DestroyPickup(pickup[1]);
           
DestroyPickup(pickup[0]);
           
DestroyPickup(pickup[3]);
           
DestroyPickup(pickup[4]);
           
DestroyPickup(pickup[5]);
           
pickup[2] = CreatePickup(3532X+2,Y+2,Z,GetPlayerVirtualWorld(playerid));
         
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~9mm~n~Shotgun~n~~g~MP5~n~~w~AK-47~n~M4~n~Sawn-off~n~_");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name MP5~n~ID 29~n~Price $260");
       }
       if(
qarms[playerid] == 4)
       {
           
DestroyPickup(pickup[1]);
           
DestroyPickup(pickup[2]);
           
DestroyPickup(pickup[0]);
           
DestroyPickup(pickup[4]);
           
DestroyPickup(pickup[5]);
           
pickup[3] = CreatePickup(3552X+2,Y+2,Z,GetPlayerVirtualWorld(playerid));
           
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~9mm~n~Shotgun~n~MP5~n~~g~AK-47~n~~w~M4~n~Sawn-off~n~_");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name AK-47~n~ID 30~n~Price $350");
       }
       if(
qarms[playerid] == 5)
       {
           
DestroyPickup(pickup[1]);
           
DestroyPickup(pickup[2]);
           
DestroyPickup(pickup[3]);
           
DestroyPickup(pickup[0]);
           
DestroyPickup(pickup[5]);
           
pickup[4] = CreatePickup(3562X+2,Y+2,Z,GetPlayerVirtualWorld(playerid));
           
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~9mm~n~Shotgun~n~MP5~n~AK-47~n~~g~M4~n~~w~Sawn-off~n~_");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name M4~n~ID 31~n~Price $360");
       }
       if(
qarms[playerid] == 6)
       {
           
DestroyPickup(pickup[1]);
        
DestroyPickup(pickup[2]);
        
DestroyPickup(pickup[3]);
        
DestroyPickup(pickup[4]);
          
DestroyPickup(pickup[0]);
           
pickup[5] = CreatePickup(3502X+2,Y+2,Z,GetPlayerVirtualWorld(playerid));
           
TextDrawSetString(Menu"~n~Weapon Menu~n~~n~9mm~n~Shotgun~n~MP5~n~AK-47~n~M4~n~~g~Sawn-off~n~_~w~");
           
TextDrawSetString(Info,"INFORMATION~n~~n~Name Sawn-off~n~ID 26~n~Price $150");
       }
       return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
menuArms[playerid] == 1)
       {
        if (
newkeys KEY_NO)
        {
            
qarms[playerid] ++;
            
Arms(playerid);
            if(
qarms[playerid] == 7)
            {
                
qarms[playerid] = 1;
                
Arms(playerid);
            }
        }
        else if (
newkeys KEY_YES)
        {
            
qarms[playerid] --;
            
Arms(playerid);
            if(
qarms[playerid] == 0)
            {
                
qarms[playerid] = 6;Arms(playerid);
            }
        }
        else if (
newkeys 16)
        {
            if(
qarms[playerid] == 1){GivePlayerMoney(playerid, -50);GivePlayerWeapon(playerid,22,500);}
             if(
qarms[playerid] == 2){GivePlayerMoney(playerid, -250);GivePlayerWeapon(playerid,25,500);}
              if(
qarms[playerid] == 3){GivePlayerMoney(playerid, -260);GivePlayerWeapon(playerid,29,500);}
               if(
qarms[playerid] == 4){GivePlayerMoney(playerid, -350);GivePlayerWeapon(playerid,30,500);}
               if(
qarms[playerid] == 5){GivePlayerMoney(playerid, -360);GivePlayerWeapon(playerid,31,500);}
               if(
qarms[playerid] == 6){GivePlayerMoney(playerid, -50);GivePlayerWeapon(playerid,26,500);}
        }
        else if (
newkeys 8)
        {
            
TextDrawHideForPlayer(playeridMenu);
            
TextDrawHideForPlayer(playeridInfo);
            
qarms[playerid] = 0;
            
menuArms[playerid] = 0;
            
DestroyPickup(pickup[0]);DestroyPickup(pickup[1]);DestroyPickup(pickup[2]);DestroyPickup(pickup[3]);DestroyPickup(pickup[4]);DestroyPickup(pickup[5]);
        }
    }
    return 
1;


Thank You!


Comment/Rate



Thanks!
Reply


Messages In This Thread
Weap TextDraw - by eMapper - 28.10.2012, 11:29
Re: Weap TextDraw - by Lordzy - 28.10.2012, 11:37
Re: Weap TextDraw - by eMapper - 28.10.2012, 11:38

Forum Jump:


Users browsing this thread: 1 Guest(s)