Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <a_players>
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/skin", true) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1)
- {
- if(response)
- {
- new skinid, message[64];
- skinid = strval(inputtext);
- if(skinid < 0 || skinid > 299)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
- }
- else
- {
- SetPlayerSkin(playerid, skinid);
- format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
- SendClientMessage(playerid, 0xFFFFFFFF, message);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement