how can i do this
#1

i have vehicles in my gamemodes

now what i want to do is When a player enters a Vehcile the Fuction SendClientMessage is called

as it sends a player messag "You Entered a : vehname Owner: state"

Thanks if anyone helps
Reply
#2

If im not wrong,try this:
pawn Код:
public OnVehicleEnter//some thing like that
{
   //message
   return 1;
}
//Or
public OnPlayerKeyChange//some thing like this
{
  //You've to find player changes to driver.
//  Then the message
   return 1;
}
Im sorry for this type of solution .
I couldnt say completly because I stopped scripting since 5.3 months and im using forums through mobile.
Reply
#3

i know how to do it but i cannot simply type all the Vehicles one by one
Reply
#4

May you tell me your vehicle variables, I must know owner variable.
Reply
#5

i dont want the Owner thing only it should just say Owner: state that means the state owns it i want all vehicles to say Owner: state
Reply
#6

Aaaa... Ok, but you must have a variable which stores that state. Have you?
Reply
#7

Umm you dint get me

IT Just need to send a Message You Entered : vehname Owner: State

Leave the State as it is i dont want like LV or LS just State
Reply
#8

Try this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
    {
        new vehicleid = GetPlayerVehicleID(playerid);
      //message here
    }
    return 1;
}
Reply
#9

same thing i need to type one by one like

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) // Player entered a vehicle as a driver
    {
        new vehicleid = GetPlayerVehicleID(playerid);
     if(vehicleid > 1 )
{
SendClientMessage)plsyerid,-1,"You entred a : Buffalo OWner State");
}//and so on
    }
    return 1;
}
Reply
#10

Forum pm me all the details and ill script it in for you, if you need scripting help ill temp script for you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)