Advertisement
Guest User

Untitled

a guest
Aug 21st, 2010
1,781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.87 KB | None | 0 0
  1. #include <a_samp>
  2. #include <a_players>
  3.  
  4. public OnPlayerCommandText(playerid, cmdtext[])
  5. {
  6.     if(strcmp(cmdtext, "/skin", true) == 0)
  7.     {
  8.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
  9.         return 1;
  10.     }
  11.     return 0;
  12. }
  13.  
  14.  
  15. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  16. {
  17.     if(dialogid == 1)
  18.     {
  19.         if(response)
  20.         {
  21.             new skinid, message[64];
  22.             skinid = strval(inputtext);
  23.             if(skinid < 0 || skinid > 299)
  24.             {
  25.                 SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
  26.             }
  27.             else
  28.             {
  29.                 SetPlayerSkin(playerid, skinid);
  30.                 format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
  31.                 SendClientMessage(playerid, 0xFFFFFFFF, message);
  32.             }
  33.         }
  34.     }
  35.     return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement