Here:
function OnChat(PlayerId, Type, Message, Target)
if Message == "!spy" then
if Get_Money(PlayerId) >= 1200 then
Set_Money(PlayerId, Get_Money(PlayerId)-1200)
Change_Character(Get_GameObj(PlayerId),"CnC_Nod_FlameThrower_2SF")
Attach_Script_Once(Get_GameObj(PlayerId), "RA_Infantry_Spy", "")
InputConsole("msg %s has bought a Spy.", Get_Player_Name_By_ID(PlayerId))
else
InputConsole("ppage %d You have not enough money! You need 1200 credits to buy this!", PlayerId)
end
end
return 1
end
[Updated on: Tue, 01 December 2009 09:08]
Report message to a moderator