Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › My very first plaugin! NOT! :(
5 posts, 3 people · 1,125 views Thread Rating: ★★★★★
closedMy very first plaugin! NOT! :(
Started by Lt.Gordon on 05-09-2010, 09:01 AM
L Lt.Gordon
started this thread
Posts: 4
Threads: 2
Joined: Apr 2010
05-09-2010, 09:01 AM #1

This plugin is supposed to greet players as they join a team. I'm pretty sure that there is nothing write in here. Some help? Please!?rnrnrn/* Plugin generated by AMXX-Studio */rnrn#include <amxmodx>rn#include <amxmisc>rn#include <dodfun> //This is for "dod_get_pl_teamname"rn#include <dodx> //This is for "#Define ALLIES 1"rnrn#define PLUGIN "Team Greeter"rn#define VERSION "1.0"rn#define AUTHOR "Lt.Gordon"rnrn#define ALLIES "1"rn#define AXIS "2"rnrnrnpublic plugin_init() {rn register_plugin(PLUGIN, VERSION, AUTHOR)rn rn // Add your code here...rn}rn{rn if (dod_get_pl_teamname(plteam == 1) // I want this to get the name of the players team.rn print("Welcome to the Allied Powers soldier!") //If the team is "1"(allies) than say...rn else rn print("Welcome to the Axis Powers soldier!") //If it's not (axis) than say...rn}

F Fysiks
posted here
Posts: 108
Threads: 3
Joined: Aug 2007
05-11-2010, 12:33 AM #2

I wrote one up quickly for you:rnrn

#include <amxmodx>rnrnpublic plugin_init()rn{rn	register_clcmd("jointeam", "cmdJoinTeam")rn}rnrnpublic cmdJoinTeam(id)rn{rn	new szArg[2]rn	read_argv(1, szArg, charsmax(szArg))rn	new iTeam = str_to_num(szArg)rn	rn	switch(iTeam)rn	{rn		case 1: client_print(id, print_chat, "Welcome to the Allied Powers soldier!")rn		case 2: client_print(id, print_chat, "Welcome to the Axis Powers soldier!")rn	}rn}rn
L Lt.Gordon
started this thread
Posts: 4
Threads: 2
Joined: Apr 2010
05-11-2010, 05:55 PM #3

Wow I was so lost making that. I'm trying to learn the PAWN language but there are also DOD commands you have to learn to. Thanks for correccting me!

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
05-11-2010, 06:13 PM #4

Gordon get to know what a forward is, and what a native is, and do alot of test prints so you can see what happens. You are on your way. And remember that are more ways to do stuff... In this case i would do like this :rnrnrn

#include <amxmodx>rn#include <dodx>rnrn#define PLUGIN "New Plug-In"rn#define VERSION "1.0 by Dr.G"rn#define AUTHOR "AMXX DoD Team"rnrnrnpublic plugin_init() rn{rn	register_plugin(PLUGIN, VERSION, AUTHOR)rn	rn	// Add your code here...rn}rnrnpublic dod_client_changeteam(id, team, oldteam)rn{rn	switch(team) rn	{ rn		case 1: client_print(id, print_chat, "Welcome to the Allied Powers soldier!") rn			rn		case 2: client_print(id, print_chat, "Welcome to the Axis Powers soldier!") rn			rn	}rn}
Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
05-11-2010, 06:14 PM #5
Archive › Old Forum Threads › Help › Scripting Help › My very first plaugin! NOT! :(
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC