Simple /Carcolour Script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple /Carcolour Script (
/showthread.php?tid=585673)
Simple /Carcolour Script -
TitanForceGeneral - 15.08.2015
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?
Re: Simple /Carcolour Script -
Vince - 15.08.2015
Quote:
Originally Posted by TitanForceGeneral
really new here
|
Quote:
Originally Posted by TitanForceGeneral
With STRCMP
|
Don't bother. Start with the best from the beginning.
Re: Simple /Carcolour Script -
TitanForceGeneral - 15.08.2015
Quote:
Originally Posted by Vince
Don't bother. Start with the best from the beginning.
|
Alright sir. If not with strcmp can you please help me make this script?
Re: Simple /Carcolour Script -
jlalt - 15.08.2015
samp wiki help on change vehicle colour:
https://sampwiki.blast.hk/wiki/ChangeVehicleColor
PHP код:
#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;
}