Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd:pm(playerid, params[])
- {
- new id, text[128], string[200];
- if(sscanf(params, "us[128]", id, text)) return USAGE(playerid, "/pm [ID/Part of name] [text]");
- if(id == INVALID_PLAYER_ID) return ERROR(playerid, "That player is not connected.");
- if(id == playerid) return ERROR(playerid, "You cannot PM yourself.");
- if(PI[playerid][pMuted] >= 1) return ERROR(playerid, "You are muted, you cannot speak.");
- if(PI[id][pAdmin] != 0)
- {
- va_SendClientMessage(id, COLOR_YELLOW, "{EFD101}(( PM from "COLOR_RED"%s{EFD101}[%d]: %s ))", GetName(playerid), playerid, text);
- va_SendClientMessage(playerid, COLOR_YELLOW, "{EFD101}(( PM for "COLOR_RED"%s{EFD101}[%d]: %s ))", GetName(id), id, text);
- lastPM[id] = playerid;
- }
- else if(PI[id][pAdmin] == 0)
- {
- va_SendClientMessage(id, COLOR_YELLOW, "{EFD101}(( PM from %s[%d]: %s ))", GetName(playerid), playerid, text);
- va_SendClientMessage(playerid, COLOR_YELLOW, "{EFD101}(( PM for %s[%d]: %s ))", GetName(id), id, text);
- lastPM[id] = playerid;
- }
- if(PI[id][pAdmin] == 0 && PI[playerid][pAdmin] == 0)
- {
- format(string, sizeof(string), "[!PM ALERT!]: %s[%d] has sent a PM to %s[%d] saying: %s", GetName(playerid), playerid, GetName(id), id, text);
- AMessage(COLOR_YELLOW, string);
- lastPM[id] = playerid;
- }
- else if(PI[id][pAdmin] != 0 && PI[playerid][pAdmin] != 0) return true;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement