Raised This Month: $ Target: $400
 0% 

[HELP] find_and_replace function?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-19-2009 , 21:17   Re: [HELP] find_and_replace function?
Reply With Quote #2

Code:
public find_and_replace(model[],type) {     new maxplayers = get_maxplayers()     new temp_entlist[30]     new num = 0;     new Float:origin[3]     new ent = engfunc(EngFunc_FindEntityByString,maxplayers,"model",model)     while(ent)     {         temp_entlist[num] = ent         num++         ent = engfunc(EngFunc_FindEntityByString,ent,"model",model)     }     for(new i=0;i<num;i++)     {         pev(temp_entlist[i],pev_origin,origin)         ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"armoury_entity"))         set_pev(ent,pev_classname,"armoury_entity")         engfunc(EngFunc_SetModel,ent,model)         cs_set_armoury_type(ent,type)         set_pev(ent,pev_solid,SOLID_TRIGGER)         set_pev(ent,pev_movetype,MOVETYPE_FLY)         set_pev(ent,pev_flags,512)         engfunc(EngFunc_SetOrigin,ent,origin)         engfunc(EngFunc_RemoveEntity,temp_entlist[i])         dllfunc(DLLFunc_Spawn,ent)     } }

Modules used:
  • Fakemeta
  • Cstrike
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 01:49.


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