It is currently 16 Jan 2019 10:06






Reply to topic  [ 2 posts ] 
 [Modificare] Meniu VIP 
Author Message
Membru, skill 0
Membru, skill 0
User avatar

Joined: 29 Nov 2015 08:01
Posts: 29
Location: Gangster
Detinator Steam: Da
CS Status: Stil
Fond eXtream: 0
Code:
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma tabsize 0

#define VIP_ACCESS   ADMIN_LEVEL_H
#define VITEZA   400.0

#define is_user_vip(%0)   (get_user_flags(%0)&VIP_ACCESS)

new bool:hs[33]

public plugin_init() {
   RegisterHam( Ham_Spawn, "player", "ham_PlayerSpawnPre", true );
   
   register_clcmd("say /vm","VM")
   register_clcmd("say_team /vm","VM")
}

public client_putinserver(id)
{
   if(is_user_vip(id)&&is_user_connected(id)&&!is_user_bot(id))
   {
      new name[32]
      get_user_name(id,name,charsmax(name))
      client_print(0,print_chat,"Vipu %s s-a conectat ",name)
   }
}

public client_PostThink(id)   if(is_user_alive(id)&&is_user_vip(id)&&hs[id])   set_user_maxspeed(id,VITEZA)

public ham_PlayerSpawnPre(id)   if(is_user_alive(id)&&is_user_vip(id)&&hs[id])   hs[id]=false

public VM(id)
{
   if(!is_user_alive(id))
   {
      client_print(id,print_chat,"Comanda poate fii folosita cand esti doar in viata")
      return
   }
   if(!is_user_vip(id))
   {
      client_print(id,print_chat,"Comanda poate fii folosita cand VIP")
      return
   }
   
   new gMenu = menu_create( "MENIU\y V.I.P", "thisContent" );
   
   menu_additem( gMenu, "AK47", "1" );
   menu_additem( gMenu, "DEAGLE", "2" );
   menu_additem( gMenu, "+300 HP", "3" );
   menu_additem( gMenu, "+SPEED", "4" );
   
   menu_setprop( gMenu, MPROP_EXIT, MEXIT_ALL );
   menu_display( id, gMenu, 0 );
}
public thisContent( id, Menu, Item )
{
   if( Item < 0 )
   {
      return 0;
   }
   
   new Key[ 3 ],Access, CallBack;
   menu_item_getinfo( Menu, Item, Access, Key, 2, _, _, CallBack );
   
   new isKey = str_to_num( Key );
   switch( isKey )
   {
      case 1:
      {
         give_item(id,"weapon_ak47")
         cs_set_user_bpammo(id,CSW_AK47,90)
      }
      case 2:
      {
         give_item(id,"weapon_deagle")
         cs_set_user_bpammo(id,CSW_DEAGLE,35)
      }
      case 3:
      {
         set_user_health(id,get_user_health(id)+300)
      }
      case 4:
      {
         if(hs[id])   return PLUGIN_HANDLED
         
         set_user_maxspeed(id,VITEZA)
         
         hs[id]=true
      }
   }
   
   return 1;
}
vreau sa se modifice acest plugin cand il pun la VITEZA Imi apare asta Image
Si mai vreau cand aleg de ex 300 HP sa imi spuna Ai ales 300 HP


12 Jan 2019 17:56
Profile multumesc WWW
Moderator
Moderator
User avatar

Joined: 17 Dec 2013 19:51
Posts: 567
Location: Mystic Falls, Virginia
Detinator Steam: Da
SteamID: /id/csall
Reputatie: Moderator
Fost Membru Club eXtreamCS (o luna)
Fond eXtream: 0
Mutat in categoria corespunzatoare.

Am incercat doar ceva:
| Afiseaza codul
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#pragma tabsize 0

#define VIP_ACCESS ADMIN_LEVEL_H
#define VITEZA 400.0
#define VITEZABACK 100.0
#define TAG "[TAG]"

#define is_user_vip(%0) (get_user_flags(%0)&VIP_ACCESS)

new bool:hs[33]

public plugin_init() {
RegisterHam( Ham_Spawn, "player", "ham_PlayerSpawnPre", true );

register_clcmd("say /vm","VM")
register_clcmd("say_team /vm","VM")
}

public client_putinserver(id)
{
if(is_user_vip(id)&&is_user_connected(id)&&!is_user_bot(id))
{
new name[32]
get_user_name(id,name,charsmax(name))
client_print(0,print_chat,"Vipu %s s-a conectat ",name)
}
}

public client_PostThink(id) if(is_user_alive(id)&&is_user_vip(id)&&hs[id]) set_user_maxspeed(id,VITEZA)

public ham_PlayerSpawnPre(id) if(is_user_alive(id)&&is_user_vip(id)&&hs[id]) hs[id]=false

public VM(id)
{
if(!is_user_alive(id))
{
client_print(id,print_chat,"Comanda poate fii folosita cand esti doar in viata")
return
}
if(!is_user_vip(id))
{
client_print(id,print_chat,"Comanda poate fii folosita cand VIP")
return
}

new gMenu = menu_create( "MENIU\y V.I.P", "thisContent" );

menu_additem( gMenu, "AK47", "1" );
menu_additem( gMenu, "DEAGLE", "2" );
menu_additem( gMenu, "+300 HP", "3" );
menu_additem( gMenu, "+SPEED", "4" );
menu_additem( gMenu, "SHIFT", "5" );

menu_setprop( gMenu, MPROP_EXIT, MEXIT_ALL );
menu_display( id, gMenu, 0 );
}
public thisContent( id, Menu, Item )
{
if( Item < 0 )
{
return 0;
}

new Key[ 3 ],Access, CallBack;
menu_item_getinfo( Menu, Item, Access, Key, 2, _, _, CallBack );

new isKey = str_to_num( Key );
switch( isKey )
{
case 1:
{
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,90)
ColorChat(id,"^4%s^1 Ai primit AK47",TAG)
}
case 2:
{
give_item(id,"weapon_deagle")
cs_set_user_bpammo(id,CSW_DEAGLE,35)
ColorChat(id,"^4%s^1 Ai primit DEAGLE",TAG)
}
case 3:
{
set_user_health(id,get_user_health(id)+300)
ColorChat(id,"^4%s^1 Ai primit 300HP",TAG)
}
case 4:
{
if(hs[id]) return PLUGIN_HANDLED

set_user_maxspeed(id,VITEZA)
ColorChat(id,"^4%s^1 Ai primit Viteza",TAG)

hs[id]=true
}
case 5:
{
if(hs[id]) return PLUGIN_HANDLED

set_user_maxspeed(id,VITEZABACK)
ColorChat(id,"^4%s^1 Ai primit VITEZA NORMALA INAPOI!",TAG)

hs[id]=true

}
}

return 1;
}

stock ColorChat(const id, const input[], any:...) {
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);

replace_all(msg, 190, "!g", "^4");
replace_all(msg, 190, "!y", "^1");
replace_all(msg, 190, "!t", "^3");

if(id) players[0] = id;
else get_players(players, count, "ch"); {
for(new i = 0; i < count; i++) {
if(is_user_connected(players[i])) {
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

_________________
CUMPAR SMS / EXCHANGE PaySafeCard-PayPal


12 Jan 2019 18:09
Profile multumesc
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group