Here's the fixed version just in case someone else wants to use it.
if (wcsistr(Message,L"!sam") == Message)
{
GameObject *Player = Get_GameObj(PlayerID);
{
if(!Is_Map_Flying()) {
Send_Message_Player(Player,255,255,127,"[DefBot] You need to be on a flying map to use !sam");
return false;
}
float money = Commands->Get_Money(Player);
float cost = 1000;
if (money >= cost)
{
int team = Commands->Get_Player_Type(Player);
if (Commands->Get_Money(Player)<1000)
{
Commands->Give_Money(Player,-1000,false);
Vector3 pos = Commands->Get_Position(Player);
pos.Z+=0.1f;
GameObject *sam = Commands->Create_Object("Nod_SAM_Site",pos);
Commands->Set_Player_Type(sam, team);
Commands->Disable_Physical_Collisions(sam);
Attach_Script_Once(sam,"JFW_Base_Defence_Aircraft_Only", "0.0,300.0,10.0,CnC_GDI_Orca,CnC_GDI_Transport,CnC_Nod_Apache,CnC_Nod_Transport");
Send_Message_Player(Player,0,255,0,"[DefBot] %s You just bought a Samsite for your team.");
Create_2D_WAV_Sound_Player(Player,"m00evan_dsgn0002i1evan_snd.wav");
}
else
{
Send_Message_Player(Player,0,255,0,"[DefBot] Insufficient Funds: Samsite cost 1000 credits.");
Create_2D_Sound_Player(Player,"m00evan_dsgn0024i1evan_snd.wav");
}
}
}
}
return false;
}
Only one code and it works with both GDI and Nod. ;p
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch