Setplayerpos
#1

i made a checkpoint which pops up a dialog like this:

PHP код:
if(dialogid == DIALOG_ARENAS1)
    {
     if(
response)
        {
            if(
playerData[playerid][playerWantedLevel] < 3)
            {    
            
                if(
listitem == 0)
                    {
                        
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
                        
SetPlayerVirtualWorld(playerid20);
                        
playerData[playerid][IsInArena1] = true;
                        
playerData[playerid][IsInAArena] = true;
                        
GivePlayerWeaponEx(playeridWEAPON_DEAGLE6000);
                        
GivePlayerWeaponEx(playeridWEAPON_SNIPER6000);
                        
                    }
                    if(
listitem == 1)
                    {
                        
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
                        
SetPlayerVirtualWorld(playerid21);
                        
playerData[playerid][IsInArena2] = true;
                        
playerData[playerid][IsInAArena] = true;
                        
GivePlayerWeaponEx(playeridWEAPON_DEAGLE6000);
                        
GivePlayerWeaponEx(playeridWEAPON_SAWEDOFF6000);
                    }
                    if(
listitem == 2)
                    {
                        
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
                        
SetPlayerVirtualWorld(playerid22);
                        
playerData[playerid][IsInArena3] = true;
                        
playerData[playerid][IsInAArena] = true;
                        
GivePlayerWeaponEx(playeridWEAPON_SHOTGSPA6000);
                        
GivePlayerWeaponEx(playeridWEAPON_MP56000);
                    }
                    if(
listitem == 3)
                    {
                        
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
                        
SetPlayerVirtualWorld(playerid23);
                        
playerData[playerid][IsInArena4] = true;
                        
playerData[playerid][IsInAArena] = true;
                        
GivePlayerWeaponEx(playeridWEAPON_SNIPER6000);
                        
GivePlayerWeaponEx(playeridWEAPON_SAWEDOFF6000);
                    }
                    if(
listitem == 4)
                    {
                        
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
                        
SetPlayerVirtualWorld(playerid24);
                        
playerData[playerid][IsInArena5] = true;
                        
playerData[playerid][IsInAArena] = true;
                        
GivePlayerWeaponEx(playeridWEAPON_SNIPER6000);
                        
GivePlayerWeaponEx(playeridWEAPON_SHOTGSPA6000);
                    }
            }
            else
                {
                    
SendClientMessage(playeridCOLOR_RED"You cannot enter duel arena with wanted level!");
                }    
        }    
    return 
1;    

problem is players gets teleported at a strange place (above SF ship) although i took cords from samp site .




another problem is, on spawn i am using this: but still doesnt works (uses normal spawn).

PHP код:
if(playerData[playerid][IsInAArena])
    {
        if(
playerData[playerid][IsInArena1])
        {
            
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
            
SetPlayerVirtualWorld(playerid20);
        }
        else if(
playerData[playerid][IsInArena2])
        {
            
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
            
SetPlayerVirtualWorld(playerid21);
        }
        else if(
playerData[playerid][IsInArena3])
        {
            
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
            
SetPlayerVirtualWorld(playerid22);
        }
        else if(
playerData[playerid][IsInArena4])
        {
            
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
            
SetPlayerVirtualWorld(playerid23);
        }
        else if(
playerData[playerid][IsInArena5])
        {
            
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
            
SetPlayerVirtualWorld(playerid24);
        }
        
SendClientMessage(playerid, -1"You spawned in a duel arena! use /leavearena to leave the duel arena!");
    } 


any solutions?
Reply


Messages In This Thread
Setplayerpos - by iLearner - 23.09.2016, 11:40
Re: Setplayerpos - by iLearner - 23.09.2016, 12:56
Re: Setplayerpos - by JaKe Elite - 23.09.2016, 13:04

Forum Jump:


Users browsing this thread: 1 Guest(s)