17.08.2012, 02:41
Right now, I'm busy eliminating the use of filterscripts from my current GM. I'm working on making a /cc [0-255] [0-255] command, to replace the filterscript I have for it. Here's what I've got so far:
I want this command to do the following (to make it better than the entire filterscript I had for it):
pawn Код:
CMD:cc(playerid, params[])
{
new
colour1,
colour2
;
if(sscanf(params, "ii", colour1, colour2)) SendClientMessage(playerid, COLOR_CHARTREUSE, "(SERVER) {33CCFF}USAGE: {FFFFFF}/cc [0-255] [0-255]");
if(!isnull(params))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
else SendClientMessage(playerid, COLOR_CHARTREUSE, "(SERVER) {FF0000}ERROR: {FFFFFF}You must be the driver of the vehicle in order to use this command.");
}
return 1;
}
- To send a message that shows what colour the player selected (e.g. You've selected color [id]) and if it's using the 2nd colour as well, then it would say "You've selected color [id] and [id]".
- I want it to make both colour1 and colour2 the same if colour1 is the only colour used (in other words, if someone typed /cc 3, then it would make the car solid red [now it makes the car solid red but with black stripes]).