AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help With Makeing Plugins (https://forums.alliedmods.net/showthread.php?t=9386)

onfirenburnin420 01-17-2005 09:26

Help With Makeing Plugins
 
Hey, First thing i got to say is thank you for makeing amxx and everyone who has made plugins good job, now i was wondering how do make them, if there i a program. Plz Help Because I have a lot of great plugin idea and ireally would like to make them come to life Thank you , FiRe

Smokey485 01-17-2005 11:09

i dont think there is a program.. u can look. I just code mine using notepad or wordpad.

onfirenburnin420 01-17-2005 12:28

i mite sound like a nub but i have no idea how to code.. if you could explain.. that would be great! :D , FiRe

XxAvalanchexX 01-17-2005 13:22

http://www.amxmodx.org/forums/templa...der_sticky.gif Sticky: Helpful Stuff / Read here first!

Peli 01-17-2005 15:18

There are programs for scripting in AMX Mod X.
1. Custom ones like Small ED ( You can find on this forum )
2. Notepad

I'd use Notepad if I were you , it's really good , plus it's already on your computer. And trust me , nobody can explain how to script in AMX Mod X in one post , but I will give you some tips.

The best ways to learn :
1. Read as many tutorials you can find on this forum ( search for them and read the one in the AMX Mod X manual www.amxmodx.org/doc )
2. Read other peoples plugins in the Plugins section , look at the code and see how they do certain things , take each function at a time , because each function does something according to how it's registered in the Public Plugin_Init() )
3. Ask specific questions in the Scripting Help section of the forum about how to do something or if you want to know what does what )
4. Read the Natives / Functions in the include files in your Include folder in the Amxx / Amxmodx folder or you can go to www.amxmodx/funcwiki.php
5. Always know that nobody is going to baby sit you and hold your hand and talk to you on AIM or something constantly helping you , you will have to learn yourself , and don't give up just because it seems hard at first )

onfirenburnin420 01-18-2005 15:55

i read as many as i can and now im working on something called weapongiver,(Credit goes to Dizzy[Nadegiver]) but i keep getting errors please help

f1del1ty.oXi 01-18-2005 16:36

you can tell them the errors all you want and cry and not do anything, but without code, they can't help you.

onfirenburnin420 01-18-2005 16:37

This is the error..... i get
 
L 01/18/2005 - 13:33:22: [AMXX] Native error in "give_item" on line 54 (file "phpMxBzFy.sma").
L 01/18/2005 - 13:33:22: [Fun] Item "weapon_Scout" failed to

onfirenburnin420 01-18-2005 16:38

here is the code THIS IS ALL CREDITED TO DIZZY!
 
#include <amxmodx>
#include <fun>

new bool:hasloaned[32]

public plugin_init() {
register_plugin("WeaponGiver","1.0","Dizzy")
register_cvar("sv_nade","1")
register_clcmd("say /smoke","Smoke")
register_clcmd("say /he","HE")
register_clcmd("say /flash","Flash")
register_clcmd("say /Scout","Scout")
register_event("ResetHUD","roundchange","b")
}

public client_connect(id) {
hasloaned[id] = false
}
public client_disconnect(id) {
hasloaned[id] = false
}

public Smoke(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_smokegrenade")
}
return PLUGIN_HANDLED
}

public HE(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_hegrenade")
}
return PLUGIN_HANDLED
}

public Flash(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_flashbang")
}
return PLUGIN_HANDLED
}

public Scout(id) {
if (hasloaned[id])
return PLUGIN_HANDLED
if (get_cvar_num("sv_nade") !=0) {
give_item(id,"weapon_Scout")
}
return PLUGIN_HANDLED
}

public roundchange(id)
{
hasloaned[id] = false
return PLUGIN_CONTINUE
}

Damocles 01-18-2005 17:07

dude may i suggest using the 'Small' syntax tags when you post some code, it makes it MUCH easier to read, and it keeps your indentation. That code is extremely hard to follow as it is.

also based on where your compile error is, wouldnt it be at a guess, the fact that youve got

give_item(id,"weapon_Scout")

shouldnt that be...

give_item(id,"weapon_scout")

p.s. i know no small, its just an observation


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

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