16.07.2014, 00:50
Just scripted a cmd /setcolor from a player, but Since I am a beginner, and don't know how to do it exactly as I want, please help me to improve it.
The things I want to be added is the following: That the admin can do /setcolor [ID] [COLOR], and it worked for me when I just did /setcolor, but when you just type as a admin/setcolor it should say "USAGE: /Setcolor [ID] [COLOR]
Quote:
CMDetcolor(playerid, params[]) { if (!IsPlayerAdmin(playerid)) { SendClientMessage(playerid, -1, "SERVER: Unknown command."); } else if (IsPlayerAdmin(playerid)) { SetPlayerColor(playerid, COLOR_YELLOW); SendClientMessage(playerid, COLOR_GREEN, "You succesfully changed the player his color."); } return 1; } |