ProKreedz Help Thread
1) I didnt ask what creates them, i asked what counts them...
maybe this is it?
if(checkpointnum[id-1] > 0) {
new cpnum = str_to_num(args2) - 1
P.S. i thought so because str_to_num usaly returns a value
2)how to make for each admin his own glow, is it possible?
1) you need to create a new variable for that because prokreedz is not counting gc.
2) it is possible in different ways. do you want to make kickadmins glowing xxx and fulladmins yyy for example?
10x a lot SchlumPF* , the checkpoint thingy works ! You are the best, but i didn`t understand the reply 4 the Top10 ... how can i make it to record the steamid then ? :)
Originally posted by SchlumPF*1) you need to create a new variable for that because prokreedz is not counting gc.
2) it is possible in different ways. do you want to make kickadmins glowing xxx and fulladmins yyy for example?
1) could you create that variable plz i would be very thankfull for your help
2) i figured it my self, i was asking because i didn realize that on 1 admin works 3 glows, because he has all 3 flags that i puted for various glows,now i fixed it just puting the glow on custom flags like m,n..
for example ADMIN_LEVEL_A=m flag,ADMIN_LEVEL_B=n flag,ADMIN_LEVEL_C=o flag
I did it :D i don`t need help any more ... 10x schlumpf :P
new currentMap[32];
get_mapname(currentMap, 32);
new topTenVault[64];
format(topTenVault, 64, "pk_%s", currentMap);
new kzTime;
kzTime = get_systime() - timer_time[id-1];
new vault = nvault_open(topTenVault);
new vaultKey[8];
new vaultReturn[128];
new arg1[32], arg2[8];
new ret;
if(vault != INVALID_HANDLE) {
for(new i = 1; i <= 10; i++) {
format(vaultKey, 8, "%d", i);
nvault_get(vault, vaultKey, vaultReturn, 128);
if(parse(vaultReturn, arg1, 32, arg2, 8) != 0) {
if(kzTime < str_to_num(arg2)) {
ret = i;
break;
} else {
ret = 0;
}
} else {
ret = i;
break;
}
}
}
nvault_close(vault);
return ret;
}
// ==================
isPlayerInTopTen(id) {
new userName[32];
get_user_name(id, userName, 32);
new currentMap[32];
get_mapname(currentMap, 32);
new topTenVault[64];
format(topTenVault, 64, "pk_%s", currentMap);
new vault = nvault_open(topTenVault);
new vaultKey[8];
new vaultReturn[128];
new arg1[32], arg2[8];
new ret;
if(vault != INVALID_HANDLE) {
for(new i = 1; i <= 10; i++) {
format(vaultKey, 8, "%d", i);
nvault_get(vault, vaultKey, vaultReturn, 128);
if(parse(vaultReturn, arg1, 32, arg2, 8) != 0 && equal(userName, arg1)) {
ret = i;
break;
} else {
ret = 0;
}
}
}
nvault_close(vault);
return ret;
}
// ==================
showTime(id, newPlace) {
new userName[32];
get_user_name(id, userName, 32);
new kzTime;
kzTime = get_systime() - timer_time[id-1];
new minutes, seconds
if((kzTime / 60.0) >= 1) {
minutes = floatround(kzTime / 60.0,floatround_floor);
kzTime -= (floatround(kzTime/ 60.0,floatround_floor) * 60);
seconds = kzTime;
} else {
minutes = 0;
seconds = kzTime;
}
set_hudmessage(255, 255, 255, -1.0, -1.0);
if(newPlace == 1) {
show_hudmessage(0, "%s finished the map in %d min %d sec and established a new record", userName, minutes, seconds);
} else if(newPlace == 0) {
show_hudmessage(0, "%s finished the map in %d min %d sec", userName, minutes, seconds);
} else {
show_hudmessage(0, "%s finished the map in %d min %d sec and established a new Top10 time", userName, minutes, seconds);
}
}
// ==================
public topten_update(id) {
new newPlace = getTopTenPlace(id);
new oldPlace = isPlayerInTopTen(id);
new userName[32];
get_user_name(id, userName, 32);
new currentMap[32];
get_mapname(currentMap, 32);
new kzTime;
kzTime = get_systime() - timer_time[id-1];
new vaultEntry[128];
format(vaultEntry, 128, "^"%s^" ^"%d^" ^"%d^"", userName, kzTime, checkpointnum[id-1]);
new topTenVault[64];
format(topTenVault, 64, "pk_%s", currentMap);
new vault = nvault_open(topTenVault);
if(oldPlace > 0) {
if(newPlace > 0 ) {
new key[8];
if(newPlace < oldPlace) {
format(key, 8, "%d", oldPlace);
nvault_remove(vault, key);
for(new i = oldPlace; i > 10; i++) {
new temp[128], tempKey[8]
format(tempKey,8,"%d",i+1)
nvault_get(vault,tempKey,temp,128)
if(!equal(temp,"")) {
format(tempKey,8,"%d",i)
nvault_pset(vault,tempKey,temp)
}
}
for(new i = 10; i > newPlace; i--) {
new temp[128], tempKey[8]
format(tempKey,8,"%d",i-1)
nvault_get(vault,tempKey,temp,128)
if(!equal(temp,"")) {
format(tempKey,8,"%d",i)
nvault_pset(vault,tempKey,temp)
}
}
format(key, 8, "%d", newPlace);
nvault_pset(vault, key, vaultEntry);
} else if(newPlace == oldPlace) {
format(key, 8, "%d", oldPlace);
nvault_remove(vault, key);
format(key, 8, "%d", newPlace);
nvault_pset(vault, key, vaultEntry);
}
showTime(id, newPlace);
}
} else {
if(newPlace > 0) {
for(new i = 10; i > newPlace; i--) {
new temp[128], tempKey[8]
format(tempKey,8,"%d",i-1)
nvault_get(vault,tempKey,temp,128)
if(!equal(temp,"")) {
format(tempKey,8,"%d",i)
nvault_pset(vault,tempKey,temp)
}
}
new key[8];
format(key, 8, "%d", newPlace);
nvault_pset(vault, key, vaultEntry);
showTime(id, newPlace);
}
}
nvault_close(vault);
}
Where line delete and paste this code in prokreedz.sma?
Schlumpf, about gochecknum, i studied pawn, so i managed to make that variable my self.
1) write the variable "new gochecknum[33]" On top,
2)in the end of public goto_cp(id,cp) you have to put gochecknum[id-1]++. Like this
}
delay_duck(id)
entity_set_origin(id,checkpoints[id-1][cp])
entity_set_vector(id,EV_VEC_velocity,Float:{0.0,0.0,0.0})
set_user_gravity(id) // to fix the low gravity bug on kz_man_redrock (thanks to NoEx)
noblock_task()
gochecknum[id-1]++
return true
}
3) if you dont want to let eny1 cheat the gocheckcount, in public goto_stuck(id) put gochecknum[id-1]++ after goto_cp(id,1) like this:
if(checkpointnum[id-1] > 1) {
goto_cp(id,1)
gochecknum[id-1]++
}
u just need id-1 if the array is 32 so u shoudl change gochecknum[33] to [32]. else gj :)
it says loose identitation
public goto_stuck(id) {
if(get_pcvar_num(kz_checkpoints) == 1) {
if(is_user_alive(id)) {
if(checkpointnum[id-1] > 1)
goto_cp(id,1)
gochecknum[id-1]++
else
client_print(id,print_chat,"No CP")
}
else
client_print(id,print_chat,"Cant do this now")
}
else
client_print(id,print_chat,"CP off")
return PLUGIN_HANDLED
}Originally posted by spermisit says loose identitationpublic goto_stuck(id) {
if(get_pcvar_num(kz_checkpoints) == 1) {
if(is_user_alive(id)) {
if(checkpointnum[id-1] > 1)
goto_cp(id,1)
gochecknum[id-1]++
else
client_print(id,print_chat,"No CP")
}
else
client_print(id,print_chat,"Cant do this now")
}
else
client_print(id,print_chat,"CP off")
return PLUGIN_HANDLED
}
public goto_stuck(id) {
if(get_pcvar_num(kz_checkpoints) == 1) {
if(is_user_alive(id)) {
if(checkpointnum[id-1] > 1) {
goto_cp(id,1)
gochecknum[id-1]++
}
else
client_print(id,print_chat,"No CP")
}
else
client_print(id,print_chat,"Cant do this now")
}
else
client_print(id,print_chat,"CP off")
return PLUGIN_HANDLED
}what do you type in consol to give someone else hook?
kz_hook name on
i read your install instructions and just set up amxmodx.
but now, when i put "meta list" into console on hlsw, the message: "[ 2] AMX Mod X RUN - amxmodx_mm... v1.70 ini ANY ANY" doesnt show up.
what am i doing wrong? what do i have to do to fix it?
//edit: solved (i hate web-interfaces so much -.-')
but now i got another prob:
i'm currently enabling all needed modules (fun, engine, cstrike and nvault) and all are running fine - exept nvault -.-
it always appears as "unknown", the line looks like this:
[ 4] unknown unknown unknown bad load
Using ProKreedz with these CVARs:
kz_checkpoints 1
kz_godmode 0
kz_scout 0
kz_help 0
kz_semiclip 1
kz_bhop 0
kz_adminglow 0
kz_cheatdetect 1
kz_transparency 1
All functions works ok except kz_hook (i am getting a scout everytime), and kz_semiclip (turns on Semiclip - Client instead of Semiclip running all the time). I checked all configs files and all kz_ cvars are ok. Using amxx 1.76d. :(
How to make the timer show in the round timer ?
Tnx in advance :)
Originally posted by VaLoSHow to make the timer show in the round timer ?
Tnx in advance :)
you should send to client new value of roundtime with every package from server.
How to teleport player to last checkpoint when player is die?
i add this code:
[CODE]
public PostSpawn(id)
{
goto_checkpoint(id)
}[/CODE]
It's compile but doesn't work =/
Maybe i need some global function from standart *.inc files for teleport player to last checkpoint when player die?
But i can't find this function in standart *.inc files =/
yeah, i did it myself.
1st Warning for Silver_Ghost:
Quad-Post...
Use the edit function instead of making doubleposts!
Please log in to post replies.