SA-MP Forums Archive
Car god mode - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car god mode (/showthread.php?tid=265088)



Car god mode - McCarthy - 29.06.2011

Well, I tried making a command to set a car invicible, but its giving me this error:
D:\SAMP\gamemodes\MMM.pwn(14910) : error 017: undefined symbol "vehicleid"
What would be the smartest way to get the id of the vehicle the person currently is in?
pawn Код:
if(strcmp(cmdtext,"/cargodmode",true) == 0)
    {
    GetPlayerVehicleID(playerid);
    SetVehicleHealth(vehicleid, 10000000000);
    SendClientMessage(playerid,COLOR_ARED, "Vehicle made indestructable");
    }
    return 1;
 }



Re: Car god mode - SmileyForCheat - 29.06.2011

i Think Better autofix


Re: Car god mode - VivianKris - 29.06.2011

new vehicleid = GetPlayerVehicleID(playerid);


Re: Car god mode - McCarthy - 29.06.2011

Thanks


Re: Car god mode - King Ace - 29.06.2011

Better way would be to make looping.


Re: Car god mode - Shadoww5 - 29.06.2011

Quote:
Originally Posted by King Ace
Посмотреть сообщение
Better way would be to make looping.
\o/ Why ?


Re: Car god mode - [MG]Dimi - 29.06.2011

Also use
pawn Код:
IsPlayerInAnyVehicle(playerid);