String help :p
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, 249.0186,1842.6013,8.7672))
{
     CreateExplosion(249.0186,1842.6013,8.7672, 2, Float:5);
     new string[128]; new playerName[MAX_PLAYER_NAME];
     GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
     format(string, sizeof(string), "%s Was Exploded by the anti attack!", playerName);
     SendClientMessageToAll(COLOR_RED, string);
}
might be a better way of doing that.

EDIT: Or try this:
At bottom of script
pawn Код:
stock playername(playerid)
{
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    return pname;
}
wherever you put this.
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 3.0, 249.0186,1842.6013,8.7672))
{
     CreateExplosion(249.0186,1842.6013,8.7672, 2, Float:5);
     new string[128];
     format(string, sizeof(string), "%s Was Exploded by the anti attack!", playerName(playerid));
     SendClientMessageToAll(COLOR_RED, string);
}
That how id do it. The playername functon is exelent.
Reply


Messages In This Thread
String help :p - by [NTX]MikeQ - 18.07.2010, 07:19
Re: String help :p - by iggy1 - 18.07.2010, 07:25
Re: String help :p - by [NTX]MikeQ - 18.07.2010, 07:26
Re: String help :p - by [NTX]MikeQ - 18.07.2010, 07:27
Re: String help :p - by iggy1 - 18.07.2010, 07:30
Re: String help :p - by Hamza' - 18.07.2010, 07:30
Re: String help :p - by iggy1 - 18.07.2010, 07:33
Re: String help :p - by [NTX]MikeQ - 18.07.2010, 07:40
Re: String help :p - by iggy1 - 18.07.2010, 07:44
Re: String help :p - by [NTX]MikeQ - 18.07.2010, 07:58

Forum Jump:


Users browsing this thread: 1 Guest(s)