Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd(pm, playerid, cmdtext[])
- {
- new Gracz;
- if(sscanf(cmdtext, "ds[124]", Gracz, tempo))
- {
- return SendClientMessage(playerid, 0xEE4000FF, "[PDS]: Użyj: /pm [ID Gracza] [Treść wiadomośći]");
- }
- if(!IsPlayerConnected(Gracz))
- {
- return SendClientMessage(playerid, 0xEE4000FF, "[PDS]: Złe ID!");
- }
- if(Player[Gracz][ZarazWraca] == true)
- {
- SCM(playerid, COLOR_GRAY, "** Gracz do którego chcesz wysłac wiadomosc jest daleko od komputera. **");
- }
- //------------------------------------------------------------------------------
- if(IsIP(tempo, false))
- return 0;
- //------------------------------------------------------------------------------
- if(GetPVarInt(playerid, "PMOFF") == 1)
- {
- SCM(playerid, COLOR_RED, "** Prywatne wiadomości wyłączone. Aby je włączyc wpisz /pmon **");
- return 1;
- }
- if(GetPVarInt(Gracz, "PMOFF") == 1)
- {
- SCM(playerid, COLOR_RED, "** Prywatne wiadomosci u tego gracza są wyłączone! **");
- return 1;
- }
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- PlayerPlaySound(Gracz, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(Gracz, "Nowy ~r~PM", 2000, 1);
- format(strr,sizeof(strr),"{00FFFF}** Wiadmość od {FFFFFF}%s (%d) {00FFFF}**", PlayerName(playerid), playerid);
- SCM(Gracz, 0x0, strr);
- format(strr,sizeof(strr),"{00FFFF}Treść:{FFFFFF} %s", tempo);
- SCM(Gracz, 0x0, strr);
- format(strr,sizeof(strr),"** Prywatna wiadomość do %s została wysłana! **", PlayerName(Gracz));
- SCM(playerid, 0x87CEFFFF, strr);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement