Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Scripting Help
Re: Scripting Help [message #420830 is a reply to message #418187] Wed, 24 February 2010 14:47 Go to previous messageGo to previous message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma:
General (1 Star)
Here are a few examples

INT Array
int myInt[127];

example loop to put player ID's in it
for(int i = 0; i < sizeof(myInt); i++)
{
    myChar[i] = playerID;
}


Char Array
char myChar[127][255]; //char uses 2 number sets for 1 array. Last set always defines the max number of characters in 1 sentence/spot

example loop to put player names in it
for(int i = 0; i < sizeof(myChar); i++)
{
    myChar[i] = playerName;
}


Note that arrays for floats, doubles, longs, bytes etc are the same as an int array

Hope this helped you a bit Thumbs Up


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Wed, 24 February 2010 14:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to add startup spawners and spawners etc!!! help!
Next Topic: Cables of the transport.
Goto Forum:
  


Current Time: Wed Nov 27 06:47:37 MST 2024

Total time taken to generate the page: 0.01622 seconds