ZCMD error
#7

pawn Код:
command(editpricecar, playerid, params[])
{
    new string[128];
    new price, carid;
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(PlayerData[playerid][pAdmin] < 6) return SendClientMessage(playerid, GREY, AdminOnly);
    else if(sscanf(params, "ud", carid, price)) return SendUsage(playerid,"/editpricecar [carid] [value]");
    else if(carid <= PreVehicle) return SendClientMessage(playerid, COLOR_WHITE, "Server: Wrong CarID");
    else if(price < 1) return SendClientMessage(playerid, COLOR_GRAD1,"Server: Pretul trebuie sa fie mai mare de 1$");
    else if(CarData[carid-PreVehicle][cModel] < 400 || CarData[carid-PreVehicle][cModel] > 611) return SendClientMessage(playerid, COLOR_GRAD1,"Server: Aceasta masina nu este personala! Este creata cu /veh");
    CarData[carid-PreVehicle][cValue] = price;
    format(string, sizeof(string), "Pretul masinii cu id-ul %d este acum %d" , carid,price);
    SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
    format(string, sizeof(string), "UPDATE cars SET Value='%d' WHERE id=%d", CarData[carid-PreVehicle][cValue], carid-PreVehicle);
    mysql_query(string);
    return 1;
}
Reply


Messages In This Thread
ZCMD error - by cotyzor - 26.10.2012, 18:55
Re: ZCMD error - by cotyzor - 26.10.2012, 19:12
Re: ZCMD error - by CoDeZ - 26.10.2012, 19:26
Re: ZCMD error - by cotyzor - 26.10.2012, 19:56
Re: ZCMD error - by gtakillerIV - 26.10.2012, 19:58
Re: ZCMD error - by cotyzor - 26.10.2012, 20:04
Re: ZCMD error - by cotyzor - 27.10.2012, 08:19
Re: ZCMD error - by gtakillerIV - 27.10.2012, 09:21
Re: ZCMD error - by Gangster-rocks - 27.10.2012, 10:33
Re: ZCMD error - by JaKe Elite - 27.10.2012, 10:45

Forum Jump:


Users browsing this thread: 6 Guest(s)