What did I do wrong?
#2

Just do this
PHP код:
CMD:carcolor(playeridcmd[], cmdtext[])
{
    new 
string[144], vcolor1vcolor2;
    if(!
IsPlayerSpawned(playerid))
        return 
SendMessage(100playeridCOLOR_WHITE""#COL_ERROR"[ERROR]: "#COL_WHITE"You must spawn before using this command.");
    
if(!IsPlayerInAnyVehicle(playerid))
        return 
SendMessage(100playeridCOLOR_WHITE""#COL_ERROR"[ERROR]: "#COL_WHITE"You are not in a vehicle.");
    
if(sscanf(params"dd"vcolor1vcolor2)) return SendClientMesage(playeridCOLOR_WHITE"USAGE:/carcolor [color1] [color2]");
    
ChangeVehicleColor(GetPlayerVehicleID(playerid), vcolor1vcolor2);
    
format(stringsizeof(string), "Vehicle colors changed to %d, and %d."vcolor1vcolor2);
    
SendMessage(100playeridCOLOR_REGULAR_PLAYERstring);
    return 
1;

EDIT:much better
Reply


Messages In This Thread
What did I do wrong? - by UnholyBeast - 18.02.2017, 08:02
Re: What did I do wrong? - by JesterlJoker - 18.02.2017, 08:17
Re: What did I do wrong? - by UnholyBeast - 18.02.2017, 18:14
Re: What did I do wrong? - by RyderX - 18.02.2017, 18:18
Re: What did I do wrong? - by UnholyBeast - 18.02.2017, 19:02
Re: What did I do wrong? - by Sew_Sumi - 18.02.2017, 21:02
Re: What did I do wrong? - by UnholyBeast - 18.02.2017, 21:41
Re: What did I do wrong? - by Sew_Sumi - 18.02.2017, 21:44
Re: What did I do wrong? - by UnholyBeast - 18.02.2017, 21:49
Re: What did I do wrong? - by Sew_Sumi - 18.02.2017, 23:01

Forum Jump:


Users browsing this thread: 3 Guest(s)