Raised This Month: $ Target: $400
 0% 

Is this used correctly?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-05-2006 , 01:08   Is this used correctly?
Reply With Quote #1

I'm not exactly sure how to use this function in dodfun.

Function:
Quote:
Originally Posted by DoDFun
/* Gets player team name */
native dod_get_pl_teamname(index,szName[],len);
Here's my guess..

Code:
new axis[33]; new allies[33];     if(dod_get_pl_teamname(index, allies, 32); {     // stuff }

What I want to do is get which team they are on, and do stuff depending on which one they are on.
__________________
LEWL.
NewUser is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-05-2006 , 01:10  
Reply With Quote #2

Code:
new PlayerTeam[16] dod_get_pl_teamname( id , PlayerTeam , 15) if(equali(PlayerTeam , "allies")) {     //they are on allies }

[EDIT] I win.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-05-2006 , 01:11  
Reply With Quote #3

Code:
new tname[21]; dod_get_pl_teamname(id , tname , 20); if(equal(team , "allies")) {   // on the allies team }
Edit: zomg nice timing XD
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-05-2006 , 01:46  
Reply With Quote #4

Thanks, now, how would I use dod_get_pronestate?

Quote:
Originally Posted by dodx.inc
/* values are: 0-no prone, 1-prone, 2-prone + w_deploy */
native dod_get_pronestate(index);
__________________
LEWL.
NewUser is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-05-2006 , 01:58  
Reply With Quote #5

Quote:
0 (PS_NOPRONE): Not prone
1 (PS_PRONE): Prone
2 (PS_PRONEDEPLOY): Prone and weapon deployed
Quote:
Originally Posted by dodconst.inc
Code:
enum {     PS_NOPRONE =0,     PS_PRONE,     PS_PRONEDEPLOY,     PS_DEPLOY, }
Code:
new prone_state = dod_get_pronestate(id); if(prone_state == PS_PRONE) {   // prone }
etc.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-05-2006 , 14:06  
Reply With Quote #6

Now, a little confused on this one.

Quote:
Originally Posted by inc file
/* Returns weapon name. */
native xmod_get_wpnname(wpnindex,name[],len);
Here's what I think, sort of.
Code:
new weapon[33]; xmod_get_wpnname(confusedhere,weapon,32); if(equali(weapon, "DODW_AMERKNIFE")) { // Has knife }
__________________
LEWL.
NewUser is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-05-2006 , 14:22  
Reply With Quote #7

it would be in the form of "weapon_<name here>"
for cs its "weapon_deagle" or something of the similar.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-05-2006 , 14:40  
Reply With Quote #8

Quote:
Originally Posted by Suicid3
it would be in the form of "weapon_<name here>"
for cs its "weapon_deagle" or something of the similar.
May I ask for an example of how to use it the proper way?
__________________
LEWL.
NewUser is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-05-2006 , 15:06  
Reply With Quote #9

same way you did it but the string wont be "DODW_AMERKNIFE" it would be more like "weapon_amerknife". I don't know what it is because I don't program for DOD specifically.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode