ProKreedz Help Thread

Started by faker mapper
07/09/2006 19:42
Page 14 of 21
tolsty17/02/2008 12:37(edited 17/02/2008 12:49)

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?

SchlumPF17/02/2008 13:38

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?

SvP17/02/2008 14:05(edited 17/02/2008 19:09)

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 ? :)

tolsty17/02/2008 16:21(edited 17/02/2008 21:53)

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

SvP18/02/2008 12:54

I did it :D i don`t need help any more ... 10x schlumpf :P

LEXAS18/02/2008 17:25

getTopTenPlace(id) {

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?

tolsty20/02/2008 00:31(edited 21/02/2008 00:13)

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]++

}

SchlumPF23/02/2008 18:12

u just need id-1 if the array is 32 so u shoudl change gochecknum[33] to [32]. else gj :)

spermis23/02/2008 21:53(edited 23/02/2008 21:53)

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
}

SchlumPF24/02/2008 12:21

Originally posted by spermis
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
}


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
}

J1`24/02/2008 17:12

what do you type in consol to give someone else hook?

padnaliQ24/02/2008 17:19

kz_hook name on

Kreedzjunge26/02/2008 18:39(edited 26/02/2008 19:37)

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

diggzie!11/03/2008 21:23

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. :(

VaLoS15/03/2008 03:22

How to make the timer show in the round timer ?
Tnx in advance :)

Silver_Ghost23/03/2008 11:17

Originally posted by VaLoS
How 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.

Silver_Ghost23/03/2008 11:50(edited 23/03/2008 11:51)

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 =/

Silver_Ghost24/03/2008 13:20

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 =/

Silver_Ghost25/03/2008 16:32

yeah, i did it myself.

faker mapper25/03/2008 17:23

1st Warning for Silver_Ghost:

Quad-Post...

Use the edit function instead of making doubleposts!

Page 14 of 21

Please log in to post replies.