15.03.2017, 20:11
Quote:
Enjoy it
PHP код:
|
PHP код:
CMD:whisper(playerid, params[])
{
new string[128],
playerName[MAX_PLAYER_NAME],
target,
Float:x,
Float:y,
Float:z;
if(sscanf(params, "us[128]", target, string))
return SendClientMessage(playerid, -1, "Syntax: /w <Name/Playerid> <Message>");
if(!IsPlayerConnected(target))
return SendClientMessage(playerid, -1, "This player is not connected.");
if(target == playerid)
return SendClientMessage(playerid, 0xFFB870ff, "You can not send a message to yourself.");
GetPlayerPos(playerid, x, y, z);
if(!IsPlayerInRangeOfPoint(target, 3.0, x, y, z))
return SendClientMessage(playerid, 0xFFFFCCff, "This player is not near you.");
GetPlayerName(playerid, playerName, sizeof(playerName));
format(string, sizeof(string), "%s whispers: %s", playerName, string);
SendClientMessage(target, 0x00DBDBff, string);
GetPlayerName(target, playerName, sizeof(playerName));
format(string, sizeof(string), "Whisper to %s: %s", playerName, string);
SendClientMessage(playerid, 0x00DBDBff, string);
return 1;
}
Depuis quand Dutheil parcourt le forum de SAMP Anglais?