carcolor script problem
#1

Hello guys. I have this problem.
I made a script for the colors of vehicles on command / carcolor [color] [color]. But it does not work properly. Almost always says that I must be in a vehicle, even when I'm inside the vehicle. Then, obscures other commands that are on other filterscript, saying the same thing. Can you help me?


// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BRIGHTRED 0xFF0000AA

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif


public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}

public OnVehicleSpawn(vehicleid)
{
return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}

public OnPlayerText(playerid, text[])
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

if(strcmp("/carcolor", cmdtext, true, 10)== 0)
{
new tmp[256];
new tmp2[256];
new color1 = strval(tmp);
new color2 = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /carcolor [color1] [color2]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /carcolor [color1] [color2]");
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
}
}
else
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a vehicle to use this command !");
return 1;
}
return 0;
}




0 error.
Only two warnings: loose indentation.
Pls help me!
Reply


Messages In This Thread
carcolor script problem - by Freght - 07.07.2010, 11:48
Re: carcolor script problem - by CAR - 07.07.2010, 11:51
Re: carcolor script problem - by DeathOnaStick - 07.07.2010, 11:52
Re: carcolor script problem - by Freght - 07.07.2010, 12:11
Re: carcolor script problem - by CAR - 07.07.2010, 12:13
Re: carcolor script problem - by Freght - 07.07.2010, 12:21
Re: carcolor script problem - by Kotomi - 07.07.2010, 12:23
Re: carcolor script problem - by CAR - 07.07.2010, 12:35
Re: carcolor script problem - by Freght - 07.07.2010, 12:36
Re: carcolor script problem - by Hiddos - 07.07.2010, 12:43
Re: carcolor script problem - by Freght - 07.07.2010, 12:55
Re: carcolor script problem - by Hiddos - 07.07.2010, 12:57
Re: carcolor script problem - by Freght - 07.07.2010, 13:00
Re: carcolor script problem - by Freght - 07.07.2010, 13:02
Re: carcolor script problem - by The_Prince - 07.07.2010, 13:02
Re: carcolor script problem - by Hiddos - 07.07.2010, 13:03
Re: carcolor script problem - by [L3th4l] - 07.07.2010, 13:17
Re: carcolor script problem - by Hiddos - 07.07.2010, 13:21
Re: carcolor script problem - by Kotomi - 07.07.2010, 13:41
Re: carcolor script problem - by Hiddos - 07.07.2010, 13:59
Re: carcolor script problem - by Freght - 07.07.2010, 14:06
Re: carcolor script problem - by Freght - 07.07.2010, 14:09
Re: carcolor script problem - by Hiddos - 07.07.2010, 14:10
Re: carcolor script problem - by Freght - 07.07.2010, 14:23
Re: carcolor script problem - by Freght - 07.07.2010, 14:28
Re: carcolor script problem - by Freght - 07.07.2010, 14:49
Re: carcolor script problem - by Toni - 07.07.2010, 16:22
Re: carcolor script problem - by [L3th4l] - 07.07.2010, 16:26
Re: carcolor script problem - by Freght - 08.07.2010, 01:17
Re: carcolor script problem - by Toni - 08.07.2010, 01:52

Forum Jump:


Users browsing this thread: 13 Guest(s)