RC Vehicles problem!
#3

Or you can do command for enter in.
pawn Код:
if (strcmp("/enter", cmdtext, true, 8) == 0)
{
new playerState = GetPlayerState(playerid);
new carid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(!IsPlayerInRangeOfPoint(playerid,5.0, -3511.0151,-74.2591,20.2049))return SendClientMessage(playerid, darkred, "You are not near the Rc car");// coordiantes where you have put your RC car
if (playerState == PLAYER_STATE_DRIVER || playerState == PLAYER_STATE_PASSENGER)return SendClientMessage(playerid,darkred,"** You already have a vehicle.");
if(IsPlayerInRangeOfPoint(playerid,5.0, -3511.0151,-74.2591,20.2049))
{
 PutPlayerInVehicle(playerid,carid,0);
 return 1;
}
}
This will work only if the car is at this location not if somebody took it and have put it somewhere else

There is something easier to do is a cmd to have this car example:
pawn Код:
if (strcmp("/rccar", cmdtext, true, 8) == 0)
{
 new playerState = GetPlayerState(playerid);
 if (playerState != PLAYER_STATE_DRIVER || playerState != PLAYER_STATE_PASSENGER)
 {
  PutPlayerInVehicle(playerid,carid,0);//replace carid by the id of the rc car
 }
 else
 {
  SendClientMessage(playerid,darkred,"** You already have a vehicle.");
  return 1;
 }
}
Reply


Messages In This Thread
RC Vehicles problem! - by Marios - 02.01.2011, 19:57
Re: RC Vehicles problem! - by Backwardsman97 - 02.01.2011, 20:17
Re: RC Vehicles problem! - by gereter - 02.01.2011, 20:25

Forum Jump:


Users browsing this thread: 3 Guest(s)