Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include a_samp.inc
- #include colorpicker.inc
- public OnPlayerSpawn(playerid)
- {
- ShowPlayerColorPicker(playerid, 3, false, false); //without "cancel" and "alpha"
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/colorname", true))
- {
- ShowPlayerColorPicker(playerid, 1, true);
- }
- if(!strcmp(cmdtext, "/colormsg", true))
- {
- ShowPlayerColorPicker(playerid, 2); //without "alpha"
- }
- return 1;
- }
- public OnColorPickerResponse(playerid, pickerid, color, response)
- {
- if(pickerid == 1)
- {
- if(!response) return 1;
- SetPlayerColor(playerid, color);
- }
- if(pickerid == 2)
- {
- if(!response) return 1;
- SendClientMessage(playerid, color, "COLOR {00AAFF}<< You choose this color");
- }
- if(pickerid == 3)
- {
- SetPlayerColor(playerid, color);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement