AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Knife Shop Menu (https://forums.alliedmods.net/showthread.php?t=318597)

Abdou Bn 09-09-2019 05:55

Knife Shop Menu
 
1 Attachment(s)
Hi Modders , im new here i need some support i have creat that shop.sma
and i dont know how i will make and deagle with 1 bullet same with awp , and i dont know how i will make an GodMODE and SPEED and INVISIBLITY with 5 sec i hop u help me :)

LearninG 09-09-2019 07:01

Re: Knife Shop Menu
 
for 1 bullet guns :
Code:
new wpn = give_item(id, "weapon_) if(wpn) {     cs_set_weapon_ammo( wpn, 1) }
for 5 sec god mode , speed , etc...
Code:
set_task(5.0,"some_func",id) public some_func(id) {     // reset user speed , god mode , invis , etc... }

Abdou Bn 09-09-2019 07:30

Re: Knife Shop Menu
 
Learning Thank You So much but if i have create respawn if i want the system say U can buy Respawn when u are alive
u know
and i want add a hud message (countdown) when u bought god mod or speed
and i dont know how to add invisiblity

Abdou Bn 09-09-2019 07:52

Re: Knife Shop Menu
 
I have some bugs i wish u type the code bcs i have a lot of errors on compiling

thEsp 09-09-2019 08:09

Re: Knife Shop Menu
 
Of course you have errors, can't you be less lazy and append '"' in the end? Please post in the right section if you don't know scripting. And search more please, https://www.google.com/search?q=amxx+invisible will give you enough information. Don't bump without waiting at least 2 weeks, simply edit the last reply or main thread.

Abdou Bn 09-09-2019 08:26

Re: Knife Shop Menu
 
the Esp ca i get help on count down and 1 bullet bcs they give me a lot of errors

SHIELD755 09-09-2019 08:46

Re: Knife Shop Menu
 
Quote:

Originally Posted by LearninG (Post 2666376)
for 1 bullet guns :
Code:
new wpn = give_item(id, "weapon_) if(wpn) {     cs_set_weapon_ammo( wpn, 1) }
for 5 sec god mode , speed , etc...
Code:
set_task(5.0,"some_func",id) public some_func(id) {     // reset user speed , god mode , invis , etc... }

PHP Code:

new wpn give_item(id"weapon_"///// You missed ' " '
if(wpn)
{
    
cs_set_weapon_ammowpn1)



Abdou Bn 09-09-2019 08:49

Re: Knife Shop Menu
 
some_func(id) dosent work :'(

Abdou Bn 09-09-2019 08:50

Re: Knife Shop Menu
 
Quote:

Originally Posted by Abdou Bn (Post 2666400)
some_func(id) dosent work :'(


LearninG 09-09-2019 09:13

Re: Knife Shop Menu
 
You should now understand how to do things with this example :
Code:
#include <amxmodx> #include <fun> #define MAX_PLAYERS 32 new g_timer new bool: has_invis[MAX_PLAYERS + 1] new bool: has_godmode[MAX_PLAYERS + 1] // // // // public client_disconnected(id) {     has_godmode[id] = false     has_invis[id] = false } case 0: // godmode {     set_user_godmode(id , 1 )     has_godmode[id] = true     set_task(5.0 , "reset_godmode",id)     pre_show_timer(id) } case 1: // invisiblity {     set_user_rendering(id, kRenderFxGlowShell, 0,0,0, kRenderTransAlpha, 0)     has_invis[id] = true     set_task(5.0 , "reset_invis" ,id)     pre_show_timer(id) } // // // pre_show_timer(id) {     g_timer = 5     show_timer(id)     set_task(1.0 , "show_timer" , id , _,_,"a",4) } public show_timer(id) {     if (is_user_connected(id))     {         set_hudmessage(0 , 255 , 0 , -1.0 , 0.25 , 0, 8.0,1.0, 0.1, 0.1, 1)         show_hudmessage(id , "%d" , g_timer)         --g_timer     } } // // public reset_godmode(id) {     if (has_godmode[id])     {         set_user_godmode(id , 0)     }     has_godmode[id] = false } // // public reset_invis(id) {     if (has_invis[id])     {         set_user_rendering(id, kRenderFxGlowShell, 0,0,0, kRenderNormal, 0)     }     has_invis[id] = false }


All times are GMT -4. The time now is 17:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.