[DUV] GetVehicleModel
#1

Bom eu queria saber Se GetVehicleModel, й que pega o Modelo do veiculo e nгo o ID... se for O que tem de errado aqui?
Код:
public IsADonateCar(carid)
{
GetVehicleModel(carid);
	if(carid == 402 ||carid == 411 ||
       carid == 415 || carid == 429 ||
	   carid == 434 || carid == 451 ||
	   carid == 463 || carid == 477  || carid == 480  || carid == 500  ||
	   carid == 506  || carid == 521 ||
	   carid == 522 || carid == 535 || carid == 541 || carid == 555 ||
	   carid == 559 || carid == 557 || carid == 560 ||
	   carid == 581 || carid == 587 || carid == 602 || carid == 603 ||
	   carid == 563)
    {
	    return 1;
    }
    return 0;
}
Para Nгo pode usar se nгo for VIP:
			if(IsADonateCar(newcar))
		{
			if(PlayerInfo[playerid][pDonateRank] < 1)
			{
				RemovePlayerFromVehicle(playerid);
				new Float:cx, Float:cy, Float:cz;
				GetPlayerPos(playerid, cx, cy, cz);
				SetPlayerPos(playerid, cx,  cy, cz);
  		 SendClientMessage(playerid, COLOR_GREY,"Vocк nгo pode usar um carro VIP!");
				 TogglePlayerControllable(playerid, 1);
     SetTimerEx("Inicio",1000,false,"i",playerid);
			}
		}
Compilou, mas eu fui sumonar um veiculo desses e nгo deu certo( PS: Cmd de Carros VIP, e eu nгo era VIP);
Reply
#2

Ngm responde n?
Reply
#3

https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
Reply
#4

tenta trocar sua public IsADonateCar(carid) por essa:

pawn Код:
public IsADonateCar(carid)
{
    new model = GetVehicleModel(carid);
    if(model == 402 ||model == 411 || model == 415 || model == 429 || model == 434 || model == 451 || model == 463 || model == 477  || model == 480  || model == 500  || model == 506  || model == 521 || model == 522 || model == 535 || model == 541 || model == 555 || model == 559 || model == 557 || model == 560 || model == 581 || model == 587 || model == 602 || model == 603 || model == 563) return 1;
    else return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)