Raised This Month: $ Target: $400
 0% 

executing code in wrong order


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 10-04-2004 , 03:08   executing code in wrong order
Reply With Quote #1

i have the following code (Natural-Selection)
Code:
public pugin_init(){     register_logevent("createcc",1) } public createcc(){     new i     ccindex[0] = 0     ccindex[1] = 0     ccindex[2] = 0     ccindex[3] = 0     // code part a     for ( i = 1; i <= ns_get_build("team_command",1,0); i++){         ccindex[pev(ns_get_build("team_command",1,i),pev_team)] = ns_get_build("team_command",1,i)     }     if (!ccindex[2]){         remove_entity(ccindex[2])     }         // code part b     pev(ccindex[3],pev_origin,cclocation)     entity_set_origin(ccindex[3],cclocation)     new Float:temporigin[3]={9999.9,9999.9,9999.9}     entity_set_origin(ccindex[3],temporigin)         ccindex[2] = create_entity("team_command")     spawn(ccindex[2])     copy_pev(ccindex[3],ccindex[2])     set_pev(ccindex[2],pev_team,2)     entity_set_origin(ccindex[2],cclocation) }
the problem is now that code part b is executed before code part a, but only when server loads (server start/mapchange plugin gets initialized)
than it works normal
why is it so?
__________________
alias White Panther
karlos is offline
 



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 17:24.


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