13.12.2013, 18:20
https://sampwiki.blast.hk/wiki/SendClientMessage
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/IsPlayerConnected
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/GetMaxPlayers
https://sampwiki.blast.hk/wiki/Loops
https://sampwiki.blast.hk/wiki/Stock#stock
https://sampwiki.blast.hk/wiki/ApplyAnimation
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/IsPlayerConnected
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/GetMaxPlayers
https://sampwiki.blast.hk/wiki/Loops
https://sampwiki.blast.hk/wiki/Stock#stock
https://sampwiki.blast.hk/wiki/ApplyAnimation
pawn Код:
//Funcion:
stock MensajeEnDistncia(playerid,color,Float:distancia,const texto[]){
SendClientMessage(playerid,color,texto);
for(new player, user = GetMaxPlayers(); player != user; player++){
if(!IsPlayerConnected(player)) continue;
if(player==playerid) continue;
new Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(IsPlayerInRangeOfPoint(player, distancia, pos[0], pos[1], pos[2])){
SendClientMessage(player,color,texto);
}
}
}
pawn Код:
//modo de uso:
#define COLOR_GREEN 0x00FF00FF
ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync);
MensajeEnDistncia(playerid,COLOR_GREEN,10.0,"hola mundo!!!.");