Skip to content

Instantly share code, notes, and snippets.

@iRusel
Created July 4, 2015 19:02
Show Gist options
  • Save iRusel/6ce083dbcd83b7374d13 to your computer and use it in GitHub Desktop.
Save iRusel/6ce083dbcd83b7374d13 to your computer and use it in GitHub Desktop.
CMD:sms
/* Ко всем new */
new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
new string[128];
CMD:sms(playerid, params[])
{
if(sscanf(params,"us", params[0], params[1])) return SendClientMessage(playerid, 0xFFFFFFAA, "По принципу /sms [id] [текст]");
if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, 0x0099FFAA,"Этого игрока нет в сети");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(params[0], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "К %s [%d]: %s", giveplayer, params[0], params[1]);
SendClientMessage(playerid, 0x0099FFAA, string);
format(string, sizeof(string), "От %s [%d]: %s", sendername, playerid, params[1]);
SendClientMessage(params[0], 0x0099FFAA, string);
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment