27.03.2010, 09:29
pawn Код:
forward MessaggioSwat(playerid);
pawn Код:
if(strcmp(cmdtext, "/911", true) == 0)
{
new callingplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, callingplayer, sizeof(callingplayer));
format(string, sizeof(string), "%s need help.", callingplayer);
SendClientMessageToAll(0xFFFF00AA, string);
MessaggioSwat(playerid);
return 1;
}
pawn Код:
public MessaggioSwat(playerid)
{
new callingplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, callingplayer, sizeof(callingplayer));
new string[128];
format(string, sizeof(string), "%s Need Help!", callingplayer);
new name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
if(strcmp(name, "[sw]", true, 4) == 0)
{
GameTextForPlayer(i, string, 3000, 3);
}
}
}
return 1;
}