05.12.2010, 09:46
(
Последний раз редактировалось ReVo_; 05.12.2010 в 10:17.
)
Hi all,
i've got a problem with SetPlayerSkin
I Change player skin with command (/teammix)
After 5/6 mix player has been blocked (can't move ecc) it's bug of SetPlayerSkin ?
FixPlayer:
i've got a problem with SetPlayerSkin
I Change player skin with command (/teammix)
pawn Код:
dcmd_teammix(playerid,params[])
{
#pragma unused params
if(RoundActive) return SendClientMessage(playerid, COLOR_RED, "Round startato.");
if(!IsPlayerAdminCommand(playerid,"teammix")) return SendClientMessage(playerid, COLOR_RED, ADMIN_REQUEST);
foreach(Player,i)
{
new rand = random(MAX_TEAMS);
while(rand==0||rand==3) rand = random(MAX_TEAMS);
gTeam[i] = rand;
FixPlayer(i);
}
SendClientMessageToAll(0x009EB6AA,"[Team Mix] Team mixati.");
return 1;
}
FixPlayer:
pawn Код:
FixPlayer(playerid)
{
SendClientMessage(playerid,COLOR_RED,"FixPlayer(%d)",playerid);
if(gTeam[playerid] == TEAM_CASA)
{
SendClientMessage(playerid,COLOR_RED,"Casa");
SetPlayerSkin(playerid, Skins[TEAM_CASA]);
SetPlayerColor(playerid, TeamColor[TEAM_CASA]);
}
else if(gTeam[playerid] == TEAM_SFIDANTE)
{
SendClientMessage(playerid,COLOR_RED,"sfidante");
SetPlayerSkin(playerid, Skins[TEAM_SFIDANTE]);
SetPlayerColor(playerid, TeamColor[TEAM_SFIDANTE]);
}
else if(gTeam[playerid] == TEAM_REF)
{
SendClientMessage(playerid,COLOR_RED,"ref");
SetPlayerSkin(playerid, Skins[TEAM_REF]);
SetPlayerColor(playerid, COLOR_GREY);
}
}