Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Own scripts.dll commands
Own scripts.dll commands [message #236066] Wed, 27 December 2006 15:18 Go to previous message
DodgeThis is currently offline  DodgeThis
Messages: 29
Registered: December 2006
Karma:
Recruit
I'm totally new to modding scripts.dll and new to c++. I followed many of these tutorials and now I think i know the basics of c++

To improve my not very developed skills I'm trying to make my own server side scripts...

I want to add my own custom commands...
I added this line to the scripts.dll (i know it's cheating but it's only to try it Smile )

 else if (stricmp(Msg2,"!setcash <player> <amount>") == 0)
{
// code
}


So if you say in teamchat "!setcash DodgeThis 800" it will set the cash of player DodgeThis to 800
Now i want to include that it only executes the code if it is me who said it, and that it works on the <player> with the <amount>

Does anyone knows how to do this?

I thought by myself it was something like
else if (stricmp(Msg2,"!setcash <player> <amount>") == 0 && strincmp(Get_Player_ID(sender), DodgeThis)
{
// code
}

[Updated on: Wed, 27 December 2006 15:40]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Teleport problem
Next Topic: spawn animation
Goto Forum:
  


Current Time: Wed Dec 25 20:24:15 MST 2024

Total time taken to generate the page: 0.00841 seconds