Raised This Month: $ Target: $400
 0% 

Problem with IF and ELSE IF


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 05-28-2005 , 11:11   Problem with IF and ELSE IF
Reply With Quote #1

Quote:
public ssj2_descend(id)
{
new currentPowerlevel = get_pdata_int(id, XXX );
remove_entity(avatar[id]);
entity_set_int ( id, EV_INT_rendermode, kRenderNormal );
entity_set_float ( id, EV_FL_renderamt, 255.0 );
set_pdata_int(id, XXX, currentPowerlevel / 2 )
set_pdata_int(id, XXX, currentPowerlevel / 2 )
return 1;
}
Playerclass is 3 and there is an Avatar layed over and player is notseeable now, cause the avatar hides it as an Modelreplacement.

now when i use the model replace ment and type ssj2_descend it works, EVERYTIME.

I want it work only when im using the create AVATAR and not the player.

so i thought something like this ?
Quote:
public ssj2_descend(id)
{
if ( avatar[id] !=0 )
{
new currentPowerlevel = get_pdata_int(id, XXX );
remove_entity(avatar[id]);
entity_set_int ( id, EV_INT_rendermode, kRenderNormal );
entity_set_float ( id, EV_FL_renderamt, 255.0 );
set_pdata_int(id, XXX, currentPowerlevel / 2 )
set_pdata_int(id, XXX, currentPowerlevel / 2 )
return 1;
}
else if ( entity_get_int( id, EV_INT_playerclass ) == 3 );
{
return 1;
}
Hope you understand what im trying to tell.
Stephen is offline
 


Thread Tools
Display Modes

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 16:35.


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