now i have this...
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 fakecivnames[14]
public plugin_init() {
register_plugin("FakeCiv","0.1","-Snort- Leader")
spawnfakecivs()
}
public spawnfakecivs() {
format(fakecivnames[0],16,"Bob Thompson")
format(fakecivnames[1],16,"Paul O Connor")
format(fakecivnames[2],16,"Big Smoke")
format(fakecivnames[3],16,"Snoop Dogg")
format(fakecivnames[4],16,"Mr. Woot")
format(fakecivnames[5],16,"Sonni")
format(fakecivnames[6],16,"Dan Ackroid")
format(fakecivnames[7],16,"Fomerly Known as Prince")
format(fakecivnames[8],16,"Cesar Hernadez")
format(fakecivnames[9],16,"Howard Stern")
format(fakecivnames[10],16,"Jack Black")
format(fakecivnames[11],16,"Tom Clancy")
format(fakecivnames[12],16,"Ben Dover")
format(fakecivnames[13],16,"Inspector Gadget")
new i
new fakecivcreateent[14]
for (i=0; i<14; i++ ) {
new Float:fakecivorigin[3];
fakecivorigin[0] = float(fakecivX[i]);
fakecivorigin[1] = float(fakecivY[i]);
fakecivorigin[2] = float(fakecivZ[i]);
new entclassname[14]
format(entclassname[i],16,"fake_civilian%i",i)
fakecivcreateent[i] = create_entity("info_target")
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")
}
i diddnt change the ptr , ptd thing becuause I couldnt understand what you meant.