Jump to content

Auto Vehicle Change Color


Ph0eniX

Recommended Posts

new avcc[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
avcc[playerid] = 0;
return 1;
}
CMD:acc(playerid,params[])
{
new acctime;
if(avcc[playerid] == 0)
{
avcc[playerid] = 1;
acctime = SetTimerEx("AutoVehicleColorChange",100,1,"i",playerid);
SendClientMessage(playerid,-1,"Auto Change Color activated!");
}
else if(avcc[playerid] == 1)
{
avcc[playerid] = 0;
KillTimer(acctime);
SendClientMessage(playerid,-1,"Auto Change Color deactivated!");
}
return 1;
}
forward AutoVehicleColorChange(playerid);
public AutoVehicleColorChange(playerid)
{
if (avcc[playerid]==1)
{
if (IsPlayerInAnyVehicle(playerid)&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
new rand = random(126)+0;
new rand1 = random(126)+0;
ChangeVehicleColor(vehicleid, rand, rand1);
}
}
return 1;
}
Nu am creeat un FS deoarece pt acest lucru nu se merita :) daca va da ceva warninguri / errori lasati reply. PS: Acest "Filter-Script" a fost creeat la cererea lu' crysty.
Nume: crysty
Nume FS: vcc
Descriere: comanda /vcc pt. a schimba culorile masinii din sec in sec
Poze(optional):

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.