Need help converting a strcmp to zcmd command
#2

pawn Код:
CMD:plate(playerid,params[])
{
    new ID = GetPlayerVehicleID(playerid);

    new strings[256];
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0x00FFFFFF, "You're not in a vehicle");
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /plate <License Plate>");
    else
    {
        format(strings, sizeof(strings), "%s",tmp);
        SetVehicleNumberPlate(ID,strings);
        strmid(CarInfo[VehicleOwned[ID]][cLicense], strings, 0, strlen(strings), 255);
        SetVehicleToRespawn(ID);
        format(strings,sizeof(strings),"{00C0FF}You've changed your plate name to %s please spawn your vehicle again",tmp);
        SendClientMessage(playerid, COLOR_LIGHTRED, strings);
        PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
        new string[128];
        format(string, sizeof(string), "plates.ini");
        if(!dini_Exists(string))
        {
            dini_Create(string);
            dini_Set(string, "License Plate", tmp);
        }
        SaveCars();

    }
    return 1;
}
Reply


Messages In This Thread
Need help converting a strcmp to zcmd command - by EAsT-OAK_510 - 19.12.2012, 05:55
Re: Need help converting a strcmp to zcmd command - by Windrush - 19.12.2012, 06:02
Re: Need help converting a strcmp to zcmd command - by EAsT-OAK_510 - 19.12.2012, 06:42
Re: Need help converting a strcmp to zcmd command - by Windrush - 19.12.2012, 06:44
Re: Need help converting a strcmp to zcmd command - by EAsT-OAK_510 - 19.12.2012, 06:48
Re: Need help converting a strcmp to zcmd command - by [MG]Dimi - 19.12.2012, 07:24

Forum Jump:


Users browsing this thread: 1 Guest(s)