SHARE
TWEET

Untitled

a guest May 10th, 2012 7 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dcmd_setskin(playerid,params[])
  2. {
  3.         if(AccInfo[playerid][Level] >= 3)
  4.         {
  5.             new Index;
  6.             new tmp[256];  tmp  = strtok(params,Index);
  7.             new tmp2[256]; tmp2 = strtok(params,Index);
  8.             if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return
  9.                 SendClientMessage(playerid, LIGHTBLUE2, "Usage: /setskin [PlayerID] [SkinID]") &&
  10.                 SendClientMessage(playerid, orange, "Function: Will set Skin of specified player!");
  11.                 new player1 = strval(tmp);
  12.                 new skin = strval(tmp2);
  13.                 new string[128];
  14.                 if(!IsValidSkin(skin))
  15.                 return SendClientMessage(playerid, red, "ERROR: Invaild Skin ID!");
  16.                 if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
  17.                 return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
  18.         if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
  19.                 {
  20.                         SendCommandToAdmins(playerid,"SetSkin");
  21.                         format(string, sizeof(string), "|- You have set \"%s's\" Skin to '%d -|", pName(player1), skin);
  22.                         SendClientMessage(playerid,BlueMsg,string);
  23.                         if(player1 != playerid)
  24.                         {
  25.                         format(string,sizeof(string),"|- Administrator \"%s\" has set your Skin to '%d' -|", pName(playerid), skin);
  26.                         SendClientMessage(player1,blue,string);
  27.                         }
  28.                         return SetPlayerSkin(player1, skin);
  29.             }
  30.                 else return ErrorMessages(playerid, 2);
  31.         }
  32.         else return ErrorMessages(playerid, 1);
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top