[Ajuda] /espiar e /poff
#4

Apуs usar a funзгo TogglePlayerSpectating(playerid, 0) (que vocк deve usar em /poff), vai ter um delay atй o player respawnar. Entгo vocк deve fazer desse jeito:

No comando /espiar:
PHP код:
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]);
PlayerInfo[playerid][iPosx] = Pos[0];
PlayerInfo[playerid][iPosz] = Pos[1];
PlayerInfo[playerid][iPosy] = Pos[2];
PlayerInfo[playerid][pInterior] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
TogglePlayerSpectating(playerid1); 
Em /poff
PHP код:
SetPVarInt(playerid"poff"1);
TogglePlayerSpectating(playerid0); 
E vocк deve setar a posiзгo do player em OnPlayerSpawn:
PHP код:
if (GetPVarInt(playerid"poff")) {
    
// Setar posiзгo
    
SetPlayerPos(playeridPlayerInfo[playerid][iPosx], PlayerInfo[playerid][iPosy], PlayerInfo[playerid][iPosz]);
    
// Interior/World
    
SetPlayerInterior(playeridPlayerInfo[playerid][pInterior]);
    
SetPlayerVirtualWorld(playeridPlayerInfo[playerid][pVirtualWorld]);
    
DeletePVar(playerid"poff");

Reply


Messages In This Thread
/espiar e /poff - by Maxwilson01 - 07.04.2017, 02:05
Re: /espiar e /poff - by ViniBorn - 07.04.2017, 02:45
Re: /espiar e /poff - by Maxwilson01 - 07.04.2017, 02:57
Re: /espiar e /poff - by ForT - 07.04.2017, 03:03
Re: /espiar e /poff - by Maxwilson01 - 07.04.2017, 03:40
Re: /espiar e /poff - by ForT - 07.04.2017, 03:42
Re: /espiar e /poff - by ViniBorn - 07.04.2017, 03:46
Re: /espiar e /poff - by Maxwilson01 - 07.04.2017, 03:52
Re: /espiar e /poff - by ViniBorn - 07.04.2017, 03:56
Re: /espiar e /poff - by Maxwilson01 - 07.04.2017, 04:04

Forum Jump:


Users browsing this thread: 2 Guest(s)