23.01.2010, 22:10
Simple question i hope How can I set a Map Icon for everybody?
pawn Код:
SetPlayerMapIcon(playerid, 1,326.3,-35.2,3.3, 30, 0 );
SetPlayerMapIcon(playerid, 1,326.3,-35.2,3.3, 30, 0 );
for(new i = 0; i <= GetMaxPlayers(); i++) SetPlayerMapIcon(i,1,326.3,-35.2,3.3,30,0);
Originally Posted by E1edge
Use looping.
Код:
for(new i = 0; i <= GetMaxPlayers(); i++) SetPlayerMapIcon(i,1,326.3,-35.2,3.3,30,0); |
for(new i = 0; i < MAX_PLAYERS; i++) { SetPlayerMapIcon(i,1,326.3,-35.2,3.3,30,0); }
public Conquersystem(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if((CONQUERED_BASE_PD==0)||(CONQUERED_BASE_PD==2))
{
CONQUERED_BASE_PD = 1;
SendClientMessageToAll(COLOR_RED,"TEAM BLUE has conquered the PD!");
SetPlayerMapIcon(i, 1,326.3,-35.2,3.3, 30, 0 );
RemovePlayerMapIcon(i, 2);
PercentConquered[playerid] = 0;
}
}
}
public Conquersystem(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if((CONQUERED_BASE_PD==0)||(CONQUERED_BASE_PD==2))
{
CONQUERED_BASE_PD = 1;
SendClientMessageToAll(COLOR_RED,"TEAM BLUE has conquered the PD!");
for(new i; i < MAX_PLAYERS; i++)
{
SetPlayerMapIcon(i, 1,326.3,-35.2,3.3, 30, 0);
RemovePlayerMapIcon(i, 2);
}
PercentConquered[playerid] = 0;
}
}
}
warning 219: local variable "i" shadows a variable at a preceding level
public Conquersystem(playerid)
{
if((CONQUERED_BASE_PD==0)||(CONQUERED_BASE_PD==2))
{
CONQUERED_BASE_PD = 1;
SendClientMessageToAll(COLOR_RED,"TEAM BLUE has conquered the PD!");
for(new i; i < MAX_PLAYERS; i++)
{
SetPlayerMapIcon(i, 1,326.3,-35.2,3.3, 30, 0);
RemovePlayerMapIcon(i, 2);
}
PercentConquered[playerid] = 0;
}
}