SHARE
TWEET

da

a guest Aug 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Cod vechi:
  2. CMD:suicide(playerid, params[]) {
  3.     if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  4.     if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda cand esti intr-o masina!");
  5.     if(IsPlayerConnected(playerid)) {
  6.         if(PlayerInfo[playerid][pLevel] >= 10) {
  7.             new string[256], sendername[256];
  8.             GetPlayerName(playerid, sendername, sizeof(sendername));
  9.             format(string, sizeof(string), "%s used [/suicide]", sendername);
  10.             SendFamilyMessage(1, COLOR_ORANGE, string);
  11.             SendFamilyMessage(2, COLOR_ORANGE, string);
  12.             SendFamilyMessage(3, COLOR_ORANGE, string);
  13.             SendFamilyMessage(8, COLOR_ORANGE, string);
  14.             ABroadCast(COLOR_ORANGE,string,1);
  15.             SCM(playerid, COLOR_ORANGE, "Te-ai sinucis, abuzul cu aceasta comanda se pedepseste cu ban.");
  16.             SetPlayerHealth(playerid, 0);
  17.         }
  18.         else return SCM(playerid, COLOR_ERROR, "Pentru a folosi aceasta comanda ai nevoie de minim level 10.");
  19.     }
  20.     return 1;
  21. }
  22.  
  23.  
  24. Cod nou:
  25. CMD:suicide(playerid, params[]) {
  26.     if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  27.     if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_LIGHTRED, "Nu poti folosi aceasta comanda cand esti intr-o masina!");
  28.     if(IsPlayerConnected(playerid)) {
  29.         if(PlayerInfo[playerid][pLevel] >= 10) {
  30.             if(PlayerInfo[playerid][pWantedLevel] < 1) {
  31.                 new string[256], sendername[256];
  32.                 GetPlayerName(playerid, sendername, sizeof(sendername));
  33.                 format(string, sizeof(string), "%s used [/suicide]", sendername);
  34.                 SendFamilyMessage(1, COLOR_ORANGE, string);
  35.                 SendFamilyMessage(2, COLOR_ORANGE, string);
  36.                 SendFamilyMessage(3, COLOR_ORANGE, string);
  37.                 SendFamilyMessage(8, COLOR_ORANGE, string);
  38.                 ABroadCast(COLOR_ORANGE,string,1);
  39.                 SCM(playerid, COLOR_ORANGE, "Te-ai sinucis, abuzul cu aceasta comanda se pedepseste cu ban.");
  40.                 SetPlayerHealth(playerid, 0);
  41.             }
  42.             else return SCM(playerid, COLOR_ERROR, "Nu poti folosi aceasta comanda daca ai wanted!");
  43.         }
  44.         else return SCM(playerid, COLOR_ERROR, "Pentru a folosi aceasta comanda ai nevoie de minim level 10.");
  45.     }
  46.     return 1;
  47. }
  48.  
  49.  
  50. Am adaugat acel if(PlayerInfo[playerid][pWantedLevel] < 1) si acel else return SCM(playerid, COLOR_ERROR, "Nu poti folosi aceasta comanda daca ai wanted!");
RAW Paste Data
Top