15.08.2015, 18:03
Hey Guys!.
I'm really new here, And currently learning Pawno. So i would like to know that how can i create a simple "/carcolour color1 color2" Cmd?
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:carcolour(playerid,params[]) {
#pragma unused params
new ColorID, ColorID2, vehicleid, str[75];
if(sscanf(params, "dd", ColorID,ColorID2)) return SendClientMessage(playerid, -1, "Usage: /buycarcolor [color1] [color2]");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You are not in a vehicle.");
else
{
vehicleid = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicleid, ColorID, ColorID2);
format(str, sizeof(str),"You have changed your vehicle's color.",ColorID, ColorID2);
SendClientMessage(playerid, -1, str);
}
return 1;
}