25.11.2014, 18:31
The command.
The result
http://i.imgur.com/dM9uMT5.png
I want if is nobody with him from the same city to return scm "You're alone." and if somebody is from the same city to look on chat like (lista persoane din orasul tau) Name1,Name2
not to spam ", , ,, " ..
pawn Код:
if(strcmp(cmd, "/orasulmeu", true) == 0)
{
if(PlayerInfo[playerid][Donator] >= 2)
{
new orasultau[456];
GetPlayerCity(playerid, orasultau, 456);
new help1[456];
for(new i; i<MAX_PLAYERS; i++)
{
new orasxd[456];
GetPlayerCity(i,orasxd, 50);
if( strcmp( orasxd, orasultau, true ) == 0 )
{
format(help1, sizeof(help1), "%s, %s.", GetName(i), help1);
}
}
new helpresult[456];
format(helpresult, sizeof(helpresult), "(Lista persoane din orasul tau) %s", help1);
SendSplitMessageEx(playerid, COLOR_GRAD1, helpresult);
}
return 1;
}
http://i.imgur.com/dM9uMT5.png
I want if is nobody with him from the same city to return scm "You're alone." and if somebody is from the same city to look on chat like (lista persoane din orasul tau) Name1,Name2
not to spam ", , ,, " ..