18.02.2010, 16:33
Quote:
Originally Posted by falor
Hey guys,
I try to code my server's vehicles to be used just by one faction for exemple. I try this : Код:
forward IsAVelib(vehicleid); Код:
public IsAVelib(vehicleid) { if(GetVehicleModel(vehicleid) >268 && GetVehicleModel(vehicleid) < 280 ) { return 1; } else return 0; } Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { passenger[playerid] = ispassenger; if (IsAVelib(vehicleid) && !ispassenger) { SendClientMessage(playerid,COLOR_GREY, "TEST"); GivePlayerMoney(playerid, -100); } I hope you'll be able to help me, thank you ! |
else if(IsAVelibCar(newcar))
{
SendClientMessage(playerid,COLOR_GREY, "TEST");
GivePlayerMoney(playerid, -100);
}
public IsAVelibCar(carid)
{
if((carid == id) || (carid == id) || (carid == id) || (carid == id) || (carid == id) || (carid == id) || (carid == id) || (carid == id))
{
return 1;
}
return 0;
}