02.01.2011, 19:57
I have put some RC vehicles in my server, but when i go to to enter, i press the enter button and i can't, nobody can enter them. Why
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;
}
}
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;
}
}