/vanish help
#1

Hi, I've been trying to make a command which is to become invisible to other players while the caster can see all the players

PHP код:
public OnPlayerUpdate(playerid)
{
         if(
Invisible[playerid] == 1) return 0;
         return 
1;
}
forward OnVanish(playeridposxposyposzangle);
public 
OnVanish(playeridposxposyposzangle) {
    
SetPlayerVirtualWorld(playerid0);
    
SetPlayerPos(playeridposxposyposz);
    
SetPlayerFacingAngle(playeridangle);
    return 
1;
}
CMD:vanish(playeridparams[]) {
    if(
PlayerInfo[playerid][pAdmin] < 4) return 0;
    if(
Invisible[playerid] == 0) {
        new 
Float:pPosXFloat:pPosYFloat:pPosZFloat:Angle;
        
GetPlayerPos(playeridpPosXpPosYpPosZ);
        
GetPlayerFacingAngle(playeridAngle);
        
SetPlayerVirtualWorld(playerid3);
        
Invisible[playerid] = 1;
        
SetTimerEx("OnVanish"100false"iffff"playeridpPosXpPosYpPosZAngle);
        
SendMessage(playerid">> You are now invisible!");
    } else {
        new 
Float:pPosXFloat:pPosYFloat:pPosZ;
        
GetPlayerPos(playeridpPosXpPosYpPosZ);
        
SetPlayerPos(playeridpPosXpPosYpPosZ 5);
        
Invisible[playerid] = 0;
        
SendMessage(playerid">> You are now visible to other players!");
    }
    return 
1;

problem is, after i've typed it, my screen says 'stay within the world boundaries', and starts to fuck up my screen by CONSTANTLY BRIGHTEN it, and it became laggy
Reply


Messages In This Thread
/vanish help - by jamjamnewbie - 01.11.2014, 15:33
Re: /vanish help - by DanishHaq - 01.11.2014, 15:55
Re: /vanish help - by jamjamnewbie - 02.11.2014, 00:53
Re: /vanish help - by Abagail - 02.11.2014, 01:19

Forum Jump:


Users browsing this thread: 2 Guest(s)