[Help]Unknown Command
#7

pawn Код:
dcmd_carcolor(playerid,params[])
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33CCFFFF,"[VT ERROR] You're not in a vehicle.");
    new color1, color2, vid=GetPlayerVehicleID(playerid);
    print("1");
    if(sscanf(params,"ii",color1,color2)) return SendClientMessage(playerid,0x33CCFFFF,"Usage: /carcolor [color 1] [color2]");
    print("2");
    if(vInfo[vid][vOwnerId] != PlayerInfo[playerid][pSQLId]) return SendClientMessage(playerid,0x33CCFFFF,"This vehicle does not belong to you.");
    vInfo[vid][vColor1]=color1;
    vInfo[vid][vColor2]=color2;
    print("3");
    ChangeVehicleColor(vid,color1,color2);
    print("4");
    SaveVehicle(vid);
    print("5");
    return 1;
}
Use these prints to debug your command in each action. Then look your samp_server.exe window and look which of these prints used. If you see 5 then it means the command works good.
Reply


Messages In This Thread
[Help]Unknown Command - by jamesb93 - 27.12.2009, 19:08
Re: [Help]Unknown Command - by Backwardsman97 - 27.12.2009, 19:38
Re: [Help]Unknown Command - by M4S7ERMIND - 27.12.2009, 19:46
Re: [Help]Unknown Command - by Backwardsman97 - 27.12.2009, 19:50
Re: [Help]Unknown Command - by jamesb93 - 27.12.2009, 19:58
Re: [Help]Unknown Command - by M4S7ERMIND - 27.12.2009, 20:03
Re: [Help]Unknown Command - by Dark_Kostas - 27.12.2009, 20:05
Re: [Help]Unknown Command - by jamesb93 - 27.12.2009, 20:51
Re: [Help]Unknown Command - by M4S7ERMIND - 27.12.2009, 21:29
Re: [Help]Unknown Command - by jamesb93 - 27.12.2009, 21:44

Forum Jump:


Users browsing this thread: 1 Guest(s)