28.03.2010, 11:48
Problem Found!
Look at this script:
The variable for player is i and what i found is:
You should change the playerid into i. So it will be like this:
pawn Код:
public MessaggioSwat()
{
new name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, "[sw]", true))
{
GameTextForPlayer(playerid,"%s Need Help!", 3000, 3, callingplayer);
}
}
}
return 1;
}
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
pawn Код:
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name, "[sw]", true))
{
GameTextForPlayer(playerid,"%s Need Help!", 3000, 3, callingplayer);
}
}
pawn Код:
GetPlayerName(i, name, sizeof(name));
if(strcmp(name, "[sw]", true))
{
GameTextForPlayer(i,"%s Need Help!", 3000, 3, callingplayer);
}
}