18.06.2016, 02:45
(
Последний раз редактировалось VZMatt; 18.06.2016 в 04:51.
)
Hi,
I have a RGB colour system, I want a savecolor for it, it means: When a player types /setmycolor 255 255 255 it will save the color for each spawn or each time that player joins.
Here the code.
Can you help me, guys?
Thanks for reading guys ^^
I have a RGB colour system, I want a savecolor for it, it means: When a player types /setmycolor 255 255 255 it will save the color for each spawn or each time that player joins.
Here the code.
Quote:
public OnPlayerConnect(playerid) cForced[playerid] = 0; return 1; dcmd_setmycolor(playerid,params[]) // { if(cForced[playerid] == 0) { static R, G, B; if (sscanf(params, "iii", R,G,B)) return SendClientMessage(playerid, 0xff0000aa, "*USAGE: /setmycolor <0-255> <0-255> <0-255>"); SendClientMessage(playerid,(R * 16777216) + (G * 65536) + (B*256), "Your color has been changed!"); SetPlayerColor(playerid, (R * 16777216) + (G * 65536) + (B*256)); } else return SendClientMessage(playerid, 0xff0000aa, "*You aren't allowed to use this command!"); return 1; } |
Thanks for reading guys ^^