Raised This Month: $ Target: $400
 0% 

Entities are not spawning!!!!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 01-29-2005 , 17:41   Entities are not spawning!!!!!
Reply With Quote #1

Whats wrong with this code?
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> new fakecivX[14] = (2959,2753,2129,2129,2129,2006,1064,65,65,-1633,-1633,-2256,-2221,-1568) new fakecivY[14] = (-515,72,120,120,120,-1849,-2220,-1655,-1655,-89,-89,-1577,-2036,-1431) new fakecivZ[14] = (-284,-264,-252,-252,-252,-172,-252,-284,-284,-268,-268,-292,-236,-284) new fakecivvoice[14] = (1,1,1,2,2,1,2,1,2,2,2,1,1,1) new fakeciv[14] new fakecivnames[14] public plugin_init() {     register_plugin("FakeCiv","0.1","-Snort- Leader")     register_clcmd("spawncivs","spawnfakecivs") } public spawnfakecivs(id) {         format(fakecivnames[0],32,"Bob Thompson")     format(fakecivnames[1],32,"Paul O Connor")     format(fakecivnames[2],32,"Big Smoke")     format(fakecivnames[3],32,"Snoop Dogg")     format(fakecivnames[4],32,"Mr. Woot")     format(fakecivnames[5],32,"Sonni")     format(fakecivnames[6],32,"Dan Ackroid")     format(fakecivnames[7],32,"Fomerly Known as Prince")     format(fakecivnames[8],32,"Cesar Hernadez")     format(fakecivnames[9],32,"Howard Stern")     format(fakecivnames[10],32,"Jack Black")     format(fakecivnames[11],32,"Tom Clancy")     format(fakecivnames[12],32,"Ben Dover")     format(fakecivnames[13],32,"Inspector Gadget")             new i     new fakecivcreateent[14]     for (i=0; i<14; i++ ) {         new fakecivorigin[3]         fakecivorigin[0] = fakecivX[i]         fakecivorigin[1] = fakecivY[i]         fakecivorigin[2] = fakecivZ[i]         new entclassname[14]         format(entclassname[i],16,"fake_civilian%i",i)         fakecivcreateent[i] = create_entity(fakeciv[i])         entity_set_string(fakecivcreateent[i],EV_SZ_classname,entclassname[i]);         entity_set_model(fakecivcreateent[i],"models/barry.mdl");         entity_set_origin(fakecivcreateent[i],fakecivorigin)         DispatchSpawn(fakecivcreateent[i])     }     return PLUGIN_HANDLED } public pfn_touch(ptr,ptd) {     new i     if(ptr < 1 || ptd < 1 || ptd > 32 || !is_user_alive(ptd) || !is_user_connected(ptd)) {         return PLUGIN_CONTINUE;         }      new classname[33];      entity_get_string(ptr,EV_SZ_classname,classname,32);         for (i=0; i<sizeof(fakecivX); i++ ) {             new entclassname[14]             format(entclassname[i],16,"fake_civilian%i",i)                 if(equal(classname,entclassname[i]) == 1) {                     new fakecivphrase[14]                         if (fakecivvoice[i] == 1) {                             format(fakecivphrase[i],64,"%s says, ^"Stop breathing on me!^"",fakecivnames[i])                             client_print(ptd,print_chat,"%s",fakecivphrase)                             client_cmd(ptd,"speak fakeciv/stopbreathingonme.wav")                             return PLUGIN_HANDLED                         }                         if (fakecivvoice[i] == 2) {                             format(fakecivphrase[i],64,"%s says, ^"Back off homie!^"",fakecivnames[i])                             client_print(ptd,print_chat,"%s",fakecivphrase)                             client_cmd(ptd,"speak fakeciv/backhomie.wav")                             return PLUGIN_HANDLED                         }                     }                 }             return PLUGIN_CONTINUE         }                         public plugin_precache() {     precache_sound("fakeciv/backhomie.wav")     precache_sound("fakeciv/stopbreathingonme.wav")     precache_model("models/barry.mdl") }

These 'fakecivs' are not spawning, and it might be somethign with the set_origin because I get a warning of tag mismatch on:

entity_set_origin(fakecivcreateent[i],fakecivorigin)

I made them spawn on a client command as I thought making it execute automatically was the problem... and its not.[/small]

I also made the name assigns in the spawnfakecivs function as it kept going on the fritz when i did new fakecivnames[14] = ("All","The","Names","Etc...")
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
 



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


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