/respawn bugs as hell if player is in vehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /respawn bugs as hell if player is in vehicle (
/showthread.php?tid=71464)
/respawn bugs as hell if player is in vehicle -
introzen - 01.04.2009
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.
Re: /respawn bugs as hell if player is in vehicle -
Norn - 01.04.2009
pawn Код:
if(IsPlayerInAnyVehicle(id))
{
RemovePlayerFromVehicle(id);
}
Re: /respawn bugs as hell if player is in vehicle -
introzen - 01.04.2009
Quote:
Originally Posted by Norn
pawn Код:
if(IsPlayerInAnyVehicle(id)) { RemovePlayerFromVehicle(id); }
|
Already tried... Didn't work.
Re: /respawn bugs as hell if player is in vehicle -
On_Top_Non_Stop - 01.04.2009
Get there position and increase the X so it takes them out the vehicle.
Re: /respawn bugs as hell if player is in vehicle -
introzen - 01.04.2009
Quote:
Originally Posted by On_Top_Non_Stop
Get there position and increase the X so it takes them out the vehicle.
|
Thanks