SA-MP Forums Archive
whats wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: whats wrong (/showthread.php?tid=658759)



whats wrong - PepsiCola23 - 11.09.2018

PHP код:
CMD:tunecar(playeridparams[]) {
    if(!
PlayerToPoint(10.0playerid949.7930,2168.0095,10.8203)) return SCM(playerid, -1"Nu esti la garajul de tuning");
    new 
idd GetPVarInt(playerid"VehicleID");
    if(
CarInfo[idd][cTuningTicket] < 1) return SCM(playerid, -1"Nu ai un tuning ticket pentru aceasta masina");
    new 
id;
    if(
sscanf(params"u"id)) return SendClientMessage(playeridCOLOR_GREY"USAGE: {FFFFFF}/tunecar <playerid/name>");
    if(
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_GREY"Acel player nu este conectat.");
    if(
PlayerInfo[id][pMember] != 8) return SCM(playerid, -1"Acel player nu este un mecanic!");
    if(
GetDistanceBetweenPlayers(playerid,id) > 5) return SendClientMessage(playeridCOLOR_GREY"Nu esti langa acel mecanic");
    
ShowPlayerDialog(idDIALOG_TUNE2DIALOG_STYLE_MSGBOX"Cerere tuning""Esti de acord sa asisti la tuningul masinii lui SMECHERU?""Confirm""Cancel");
    
idtuner[id] = playerid;
    
idmecanic[playerid] = id;
    
//ShowPlayerDialog(playerid, DIALOG_TUNE, DIALOG_STYLE_MSGBOX, "Confirma plata", "Mecanicul percepe o taxa de 50 dolari.\nEsti de acord cu plata acesteia?", "Confirm", "Cancel");
    
return 1;

this is the cmd,i always get
PHP код:
if(CarInfo[idd][cTuningTicket] < 1) return SCM(playerid, -1"Nu ai un tuning ticket pentru aceasta masina"); 
this message in chat,it doesnt go past this no matter what.


Re: whats wrong - Florin48 - 11.09.2018

en: you need a tuning ticket
ro: iti arata si mesajul, incearca sa stergi acea linie de verificare daca nu iti place faza cu tuning ticket