Advertisement
BlooDMasK

ONPLAYERCLICKPLAYER SYSTEM

Sep 30th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.25 KB | None | 0 0
  1. if(dialogid == DIALOG_ADMIN)
  2.     {
  3.         if(response)
  4.         {
  5.             new ClickP = GetPVarInt(playerid, "clickplayer");
  6.             switch(listitem)
  7.             {
  8.                 case 0://KICK
  9.                 {
  10.                     SCM(ClickP, ROSSO, "[!] {FFFFFF}Sei stato kickato da un admin.");
  11.                     SetTimerEx("KickPlayerClick", 100, false, "i", ClickP);
  12.                 }
  13.                 case 1://MUTE
  14.                 {
  15.                     if(Muto[ClickP] == 0){
  16.                     Muto[ClickP] = 1;
  17.                     SCM(ClickP, ROSSO, "[!] {FFFFFF}Sei stato mutato");}else{
  18.                     Muto[ClickP] = 0;
  19.                     SCM(ClickP, ROSSO, "[!] {FFFFFF}Sei stato smutato");}
  20.                 }
  21.                 case 2://SPEC
  22.                 {
  23.                
  24.                 }
  25.                 case 3://Specoff
  26.                 {
  27.                
  28.                 }
  29.                 case 4://GOTO
  30.                 {
  31.                     if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, COLOR_GRAD2, NOTADMIN);
  32.                     new vehicleid = GetPlayerVehicleID(playerid);
  33.                     new pinterior = GetPlayerInterior(ClickP);
  34.                     new Float:x, Float:y, Float:z;
  35.                     if(IsPlayerInAnyVehicle(ClickP))
  36.                     {
  37.                         if(IsSeatTaken(GetPlayerVehicleID(ClickP), 0))
  38.                         {
  39.                             GetPlayerPos(ClickP, x, y, z);
  40.                             SetPlayerPos(playerid, x+1, y+1, z);
  41.                             PutPlayerInVehicle(playerid, GetPlayerVehicleID(ClickP), 1);
  42.                             SetPlayerInterior(playerid, pinterior);
  43.                         }
  44.                         else if(IsSeatTaken(GetPlayerVehicleID(ClickP), 1))
  45.                         {
  46.                             GetPlayerPos(ClickP, x, y, z);
  47.                             SetPlayerPos(playerid, x+1, y+1, z);
  48.                             PutPlayerInVehicle(playerid, GetPlayerVehicleID(ClickP), 2);
  49.                             SetPlayerInterior(playerid, pinterior);
  50.                         }
  51.                         else if(IsSeatTaken(GetPlayerVehicleID(ClickP), 2))
  52.                         {
  53.                             GetPlayerPos(ClickP, x, y, z);
  54.                             SetPlayerPos(playerid, x+1, y+1, z);
  55.                             PutPlayerInVehicle(playerid, GetPlayerVehicleID(ClickP), 3);
  56.                             SetPlayerInterior(playerid, pinterior);
  57.                         }
  58.                         else if(IsSeatTaken(GetPlayerVehicleID(ClickP), 3))
  59.                         {
  60.                             GetPlayerPos(ClickP, x, y, z);
  61.                             SetPlayerPos(playerid, x+1, y+1, z);
  62.                             SetPlayerInterior(playerid, pinterior);
  63.                         }
  64.                     }
  65.                     else if(!IsPlayerInAnyVehicle(ClickP))
  66.                     {
  67.                         SetPlayerInterior(playerid, pinterior);
  68.                         GetPlayerPos(ClickP, x, y, z);
  69.                         SetPlayerPos(playerid, x+1, y+1, z);
  70.                         SetVehiclePos(vehicleid, x, y, z);
  71.                         PutPlayerInVehicle(playerid, vehicleid, 0);
  72.                     }
  73.                     else if(IsPlayerInAnyVehicle(ClickP) && IsPlayerInAnyVehicle(playerid))
  74.                     {
  75.                         SetPlayerInterior(playerid, pinterior);
  76.                         GetPlayerPos(ClickP, x, y, z);
  77.                         SetPlayerPos(playerid, x+1, y+1, z);
  78.                         SetVehiclePos(vehicleid, x, y, z);
  79.                         PutPlayerInVehicle(playerid, vehicleid, 0);
  80.                     }
  81.                 }
  82.                 case 5://GETHERE
  83.                 {
  84.                     new Float:x, Float:y, Float:z;
  85.                     new vw = GetPlayerVirtualWorld(playerid);
  86.                     new interior = GetPlayerInterior(playerid);
  87.                     GetPlayerPos(playerid, x, y, z);
  88.                     SetPlayerPos(ClickP, x+1, y+1, z);
  89.                     GetPlayerVirtualWorld(playerid);
  90.                     SetPlayerVirtualWorld(ClickP, vw);
  91.                     SetPlayerInterior(ClickP, interior);
  92.                 }
  93.                 case 6://PM
  94.                 {
  95.                     new text[128], string[128];
  96.                     format(string, sizeof(string), "(( [PM] a %s[ID:%d]: %s ))", RemoveUnderScore(ClickP),ClickP, text);
  97.                     SCM(playerid, GIALLO, string);
  98.                     format(string, sizeof(string), "(( [PM] da %s[ID:%d]: %s ))", RemoveUnderScore(playerid),playerid, text);
  99.                     SCM(ClickP, 0xEAFF00FF, string);
  100.                     PlayerPlaySound(ClickP,1057,0.0,0.0,0.0);
  101.                 }
  102.                 case 7://FREEZE
  103.                 {
  104.                     new string[128];
  105.                     TogglePlayerControllable(ClickP,0);
  106.                     format(string, sizeof(string), "[!] {FFFFFF}Hai freezato %s",RemoveUnderScore(ClickP));
  107.                     SCM(playerid,ROSSO,string);
  108.                 }
  109.                 case 8://UNFREEZE
  110.                 {
  111.                     new string[128];
  112.                     TogglePlayerControllable(ClickP,1);
  113.                     format(string, sizeof(string), "[!] {FFFFFF}Hai unfreezato %s",RemoveUnderScore(ClickP));
  114.                     SCM(playerid,ROSSO,string);
  115.                 }
  116.                 case 9:
  117.                 {
  118.                     //DAIARMA
  119.                 }
  120.                 case 10:
  121.                 {
  122.                     //SETSKIN
  123.                 }
  124.                 case 11:               
  125.                 {
  126.                     //SETHP
  127.                 }
  128.                 case 12:
  129.                 {
  130.                     //SETARMOR
  131.                 }
  132.                 case 13://LOCKPG
  133.                 {
  134.                     new string[128];
  135.                     format(string, sizeof(string), "[!] {FFFFFF}Hai Lockato il pg di %s",RemoveUnderScore(ClickP));
  136.                     SCM(playerid,ROSSO,string);
  137.                     SCM(ClickP,-1,"IL TUO PG E' STATO LOCCATO PER MORTE IC");
  138.                     PlayerInfo[ClickP][pLock] = 1;
  139.                     SetTimerEx("KickPlayerClick", 100, false, "i", ClickP);
  140.                 }
  141.                 case 14://BAN
  142.                 {
  143.                     SCM(ClickP, ROSSO, "[!] {FFFFFF}Sei stato bannato!");
  144.                     SetTimerEx("BanPlayerClick", 100, false, "i", ClickP);
  145.                 }
  146.             }
  147.         }
  148.     }
  149.  
  150. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  151. {  
  152.     new string[250];
  153.     format(string, sizeof(string),"Moderazione per '{FFEE00}%s(ID:%d){FFFFFF}'",GetName(clickedplayerid),clickedplayerid);
  154.     if(PlayerInfo[playerid][pAdmin] == 1 ) return ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_LIST, string, "Kick\nMuta\nSpec\nSpecoff\nGoto\nGethere\nPm\nFreeze\nUnfreeze\nDaiarma\nSetskin\nSethp\nSetarmor", "Esegui", "Annulla");
  155.     if(PlayerInfo[playerid][pAdmin] == 2 ) return ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_LIST, string, "Kick\nMuta\nSpec\nSpecoff\nGoto\nGethere\nPm\nFreeze\nUnfreeze\nDaiarma\nSetskin\nSethp\nSetarmor\nLockpg\nBan", "Esegui", "Annulla");
  156.     if(PlayerInfo[playerid][pAdmin] == 0 ) return SCM(playerid, ROSSO, NOTADMIN);
  157.     SetPVarInt(playerid, "clickplayer",clickedplayerid);
  158.     return 1;
  159. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement