Created
July 4, 2015 19:02
-
-
Save iRusel/6ce083dbcd83b7374d13 to your computer and use it in GitHub Desktop.
CMD:sms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ко всем 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