/respawn bugs as hell if player is in vehicle
#1

here is my respawn command...

pawn Код:
dcmd_respawn(playerid,params[])
    {
      if(PlayerInfo[playerid][pAdmin] == 0) return 1;
      new id,pName[MAX_PLAYER_NAME],idName[MAX_PLAYER_NAME],server[256];
      if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /respawn <playerid/partofname>");
      if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_DARKRED, "Player not found");
      GetPlayerName(playerid,pName,sizeof(pName));
      GetPlayerName(id,idName,sizeof(idName));
      format(server,sizeof(server),"%s was respawned by Admin %s",idName,pName);
      SetPlayerVirtualWorld(playerid,0);
      SendClientMessageToAll(COLOR_DARKRED,server);
      RemovePlayerFromVehicle(id);
      SpawnPlayer(id);
      return 1;
    }
if the player is in a car, the player gets stuck in the car until /slap... Then he can do F and exit.
Reply
#2

pawn Код:
if(IsPlayerInAnyVehicle(id))
{
RemovePlayerFromVehicle(id);
}
Reply
#3

Quote:
Originally Posted by Norn
pawn Код:
if(IsPlayerInAnyVehicle(id))
{
RemovePlayerFromVehicle(id);
}
Already tried... Didn't work.
Reply
#4

Get there position and increase the X so it takes them out the vehicle.
Reply
#5

Quote:
Originally Posted by On_Top_Non_Stop
Get there position and increase the X so it takes them out the vehicle.
Thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)