SA-MP Forums Archive
Player ID 0 Bug/Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player ID 0 Bug/Error (/showthread.php?tid=74308)



Player ID 0 Bug/Error - Jakku - 21.04.2009

Now I have following problem: In my server player what ID is 0, will be teleported to somewhere where he have been earlier on other player connects to server. And also I have /job command system and only ID 0 got some money for doing job. And I added message to warp command when I warp to other player, always ID 0 got "Admin warped to your position" message also when I warped example ID 2


Hope you understood, I dont know what is wrong


Re: Player ID 0 Bug/Error - NtCat - 21.04.2009

For those money, use for(new i = 0; i < MAX_PLAYERS; i++) cycle....


Re: Player ID 0 Bug/Error - Jakku - 21.04.2009

I have that thing on my code but wont help


Код:
public SetFreeze(){
new Float:lfrozex,Float:lfrozey,Float:lfrozez;
for(new i = 0; i < MAX_PLAYERS; i++) {
if(Frozen[i] == 1){
GetPlayerPos(i,lfrozex,lfrozey,lfrozez);

SetPlayerPos(i, frozex,frozey,frozez);
}
}
}



Re: Player ID 0 Bug/Error - Jakku - 21.04.2009

I found those


Код:
public SetFreeze(){
new Float:lfrozex,Float:lfrozey,Float:lfrozez;
for(new i = 0; i < MAX_PLAYERS; i++) {
if(Frozen[i] == 1){
GetPlayerPos(i,lfrozex,lfrozey,lfrozez);

SetPlayerPos(i, frozex,frozey,frozez);
}
}
}

public BanPlayer(){
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)){
if(banning[i] == 1){
Ban(i);
}
}
}
}
public KickPlayer(){
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)){
if(kicking[i] == 1){
Kick(i);
}
}
}
}



Re: Player ID 0 Bug/Error - MenaceX^ - 21.04.2009

I don't see anything that shold give money..


Re: Player ID 0 Bug/Error - Jakku - 21.04.2009

Dont watch that code just help me to solve problem!