Command 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: Command help (
/showthread.php?tid=592629)
Command help -
Banditul18 - 27.10.2015
Hello sa-mp scripters, i need help to a command i want to getvehicleid in zcmd, how i can get it?
CMD:work(playerid, cmdtext)
{
if(GetVehicleModel(vehicleid) == 515);
{
ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Choose any of those locations", "From --- to --- /*(listitem 0)*/ \nFrom --- to --- /*(listitem 1)*/ \nFrom --- to ---/*(listitem 2)*/", "Ok", "Cancel");
}
else
SendClientMessage(playerid, red, "Nu esti in tir");
return 1;
}
I want to make my gamemode from 0...
Re: Command help -
thefirestate - 27.10.2015
In order to check the vehicle id you have to make sure that the player is in a vehicle by using IsPlayerInAnyVehicle or GetPlayerState , after that you can do vehicleid = GetPlayerVehicleID(playerid) and that is how you get the id of the vehicle. After that you can check model of the veh, pos , params, pretty much everything that required the vehicle id.
Re: Command help -
Banditul18 - 27.10.2015
Thanks for help