AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I dont understand get_item plz help.. (https://forums.alliedmods.net/showthread.php?t=10049)

Crazywelder1 02-06-2005 22:39

I dont understand get_item plz help..
 
Okay i ve been trying and trying to figure out how to do the native get_item (for a weapon)
but i can't seem to get it so here i am asking for some help this is what i have been writing it as but maybe u guys can explain wat excatly u put for it

THIS IS WAT I VE BEEN PUTTING:

give_item(id, weapon_M4a1)

i know its way off so plz be sypathetic just learning and getting the hang of it.. ty for ur time

TotalNoobScripter 02-06-2005 22:56

http://www.amxmodx.org/funcwiki.php?go=func&id=156
http://www.amxmodx.org/funcwiki.php?go=func&id=163

Crazywelder1 02-06-2005 23:14

thats not the function i was talking about but thank you anyways for your time
the one i am talking about is give_item

sorry for the inconvenice miss spelt wat function ment it is give not get.. sorry again

twistedeuphoria 02-06-2005 23:15

What module is get_item in?

Crazywelder1 02-06-2005 23:18

the module FUN

just to let u all know i am sorry for miss spelling since u cant help me if i dont give the right function lol

TotalNoobScripter 02-06-2005 23:29

doh... give_item.... i thought u were doing get_item... sorry.


new itemtogive[32]
format(itemtogive,31,"weapon_m4a1")
give_item ( index, itemtogive )

?

Crazywelder1 02-06-2005 23:40

so thats right okay thank you very much its apreeciated dont worry about it it was my fault u guys cant read minds u know lol

XxAvalanchexX 02-06-2005 23:41

No need for a variable, give_item(id,"weapon_m4a1"); works just as well. Case-sensitive, by the way.

TotalNoobScripter 02-06-2005 23:42

ahah! case-sensitive... thats why your M4a1 doesnt work i believe.

Crazywelder1 02-06-2005 23:50

u mean i am right how i wrote it but it needs to be lower cased??

ok it worked but i ve also have had a problem with getting one loose indentation can u help me figure it ou becuase i ve been try really hard since i did get it from 2 to 1 loose indentation.


Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <amxconst> // PLUGIN[]="WeaponGiver" // AUTHOR[]="Garrett" // VERSION[]="0.01" public plugin_init() {     register_plugin("WeaponGiver", "0.01", "Garrett")     register_concmd("amx_wg", "cmd_wg", ADMIN_SLAY, "Gives weapon!!") } public cmd_wg(id, level, cid) {     if (!cmd_access(id, level, cid, 2))        return PLUGIN_HANDLED         give_item(id, "weapon_m4a1") {   return PLUGIN_HANDLED         }       }


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

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