SA-MP Forums Archive
/repair Commad help - 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: /repair Commad help (/showthread.php?tid=421427)



/repair Commad help - Young_M - 09.03.2013

Hello,

today I've scripted a repair command for mechanics. If I go ingame and drive a towtruck it always says

Quote:

You are not driving a Towtruck

even if I do.

code:
Quote:

for(new i=0; i < sizeof(MechanicVEH); i++)
{
if(GetPlayerVehicleID(playerid) != MechanicVEH[i]) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a Towtruck.");
}

MechanicVEH = towtruck

Thanks for your help


Re: /repair Commad help - Denying - 09.03.2013

pawn Код:
for(new i=0; i < sizeof(MechanicVEH); i++)
{
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 252) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a Towtruck.");
}
Try using this.

EDITED: Try again.


AW: /repair Commad help - Young_M - 09.03.2013

Didn't work


Re: /repair Commad help - Denying - 09.03.2013

Try my command again, I edited it and if that does not work, remove the loop.