09.04.2011, 22:14
Hello!
It seams that my server dont like more then 3 players on the server.
One problem was that if i made ID 3 teamleader of a team, and then when he leaves and a another player join and gets ID 3, then he spawn at the place were the player i made teamleader and were his team spawns and gets their color (if ID 3 is not in a team i guess)
never seen that problem since i made this
And now.. it also seams that score counting only goes to ID 1-3, is that a samp or a script bug?
heres the OnPlayerDeath, the first 4 lines is for a script to score bombkilling
It seams that my server dont like more then 3 players on the server.
One problem was that if i made ID 3 teamleader of a team, and then when he leaves and a another player join and gets ID 3, then he spawn at the place were the player i made teamleader and were his team spawns and gets their color (if ID 3 is not in a team i guess)
never seen that problem since i made this
pawn Код:
public OnPlayerConnect(playerid)
{
Jail[playerid] = 0;
Leader[playerid] = 0;
Member[playerid] = 0;
heres the OnPlayerDeath, the first 4 lines is for a script to score bombkilling
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, "nearExp") > -1 && killerid == INVALID_PLAYER_ID) {
killerid = GetPVarInt(playerid, "nearExp");
if(killerid == playerid) killerid = INVALID_PLAYER_ID;
reason = 51;
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
return 1;
}