Doors locked help
#1

Hi,


I want to make a car lock... i made that everything works ,but when other player try to get in into car he pull me up and gets text The cars is locked and owner is : bla bla bla... but he get me off the car...


How to do that it would get animation that doors locked and get a message that car owner is : bla bla bla


Quote:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid > maxvehicles || vehicleid < 0)
{
}
if(vehicleDB[vehicleid][locked] && !playerDB[playerid][bypass])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
if(strcmp(name,vehicleDB[vehicleid][owner_name],true))
{
Stop(playerid);
ApplyAnimation(playerid, "PED", "CAR_doorlocked_LHS", 4.000000, 0, 0, 0, 0, -1);
new msg[128];
format(msg,sizeof(msg),"This car locked. Owner is %s",vehicleDB[vehicleid][owner_name]);
SendClientMessage(playerid,RED,msg);
return 1;
}

SendClientMessage(playerid,COLOR,"Thats yours car");
playerDB[playerid][rbool][0]=true;
}

return 1;
}
Reply
#2

I guess you will be needing:

Код:
OnVehicleStreamIn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)