I need help please
#1

Hey i want to know how to do If someone enters a Vehicle ID 520 and tell them what is the Vehicle ID
Reply
#2

PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    new 
str[128];
    
format(str,128,"You have entered vehicle ID %i",vehicleid);
    
SendClientMessage(playerid,-1,str);
    return 
1;

For any vehicle

PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    if(
vehicleid == 520)
    {
        new 
str[128];
        
format(str,128,"You have entered vehicle ID %i",vehicleid);
        
SendClientMessage(playerid,-1,str);
    }
    return 
1;

For VEHICLE ID 520.
But I guess you need model ID 520 which is hydra do it like this

PHP код:
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    new 
modelid GetVehicleModel(vehicleid));
    if(
modelid == 520SendClientMessage(playerid,-1,"You have entered Hydra");
    return 
1;

Reply
#3

Thanks !!!
Reply
#4

No problem

Check OnPlayerEnterVehicle
GetVehicleModel
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)