Cant get the /veh command to work! - 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: Cant get the /veh command to work! (
/showthread.php?tid=409575)
Cant get the /veh command to work! -
Smikkeltoetje - 22.01.2013
CMD:veh(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
ShowModelSelectionMenu(playerid, f, "->Vehicles<-");
return 1;
}
i get error 017 on "ShowModelSelectionMenu" What can i replace this with?
Re: Cant get the /veh command to work! -
Jewell - 22.01.2013
Quote:
Originally Posted by Smikkeltoetje
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
ShowModelSelectionMenu(playerid, f, "->Vehicles<-");
return 1;
}
|
are you sure ?
what you want to do with this command ? spawn a vehicle ?
Re : Cant get the /veh command to work! -
Rayan_black - 22.01.2013
Well, post the menu code please.
Re: Re : Cant get the /veh command to work! -
Smikkeltoetje - 22.01.2013
Quote:
Originally Posted by Rayan_black
Well, post the menu code please.
|
Changed the code to this
pawn Код:
CMD:aveh(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new type,color,color2,Float:cPos[4];
if(sscanf(params, "iii", type,color,color2)) return SendClientMessage(playerid,COLOR_RED, "/aveh [model] [color] [color]");
if(type < 400 || type > 611) return SendClientMessage(playerid,COLOR_RED, "vehicle IDs between 400 - 611!");
if(color> 255 || color< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
if(color2> 255 || color2< 0) return SendClientMessage(playerid, 0xFFFFFF, "Car color ID's: 0-255");
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
GetPlayerFacingAngle(playerid, cPos[3]);
CreateVehicle(type, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
return 1;
}
After i try this command it suddently loads 0 vehicles in-game.
And fails to find the examplename.AMX file...