HELP with /b
#7

stock PlayerToPlayer(playerid,targetid,Float:distance)
{
new Float, Float:y, Float:z; GetPlayerPos(playerid,x,y,z);
if(IsPlayerInRangeOfPoint(targetid,distance,x,y,z) )
{
return true;
}
return false;
}

CMD(playerid, params[])
{
new text[256];
if(!sscanf(params, "s[256]", text))
{
for(new i; i<MAX_PLAYERS; i++)
{
if((PlayerToPlayer(playerid,i,20))&&(GetPlayerVirt ualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
new msg[256], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "%s (OOC): %s", name, text); SendClientMessage(i, 0xFFFFFFAA, msg);
}
}
}
else{SendClientMessage(playerid, 0xB3D3FBAA, "[Chat info]: Usage: /o <text>.");}
return 1;
}
Reply


Messages In This Thread
HELP with /b - by Matej_ - 31.01.2011, 13:48
Re: HELP with /b - by bartje01 - 31.01.2011, 13:49
Re: HELP with /b - by [03]Garsino - 31.01.2011, 13:53
Re: HELP with /b - by Matej_ - 31.01.2011, 13:54
Re: HELP with /b - by bartje01 - 31.01.2011, 14:09
Re: HELP with /b - by [03]Garsino - 31.01.2011, 14:19
Re: HELP with /b - by Audiophr3ak - 31.01.2011, 14:23
Re: HELP with /b - by Matej_ - 31.01.2011, 14:27
Re: HELP with /b - by [03]Garsino - 31.01.2011, 14:36

Forum Jump:


Users browsing this thread: 2 Guest(s)