23.09.2016, 11:40
i made a checkpoint which pops up a dialog like this:
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).
any solutions?
PHP код:
if(dialogid == DIALOG_ARENAS1)
{
if(response)
{
if(playerData[playerid][playerWantedLevel] < 3)
{
if(listitem == 0)
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 20);
playerData[playerid][IsInArena1] = true;
playerData[playerid][IsInAArena] = true;
GivePlayerWeaponEx(playerid, WEAPON_DEAGLE, 6000);
GivePlayerWeaponEx(playerid, WEAPON_SNIPER, 6000);
}
if(listitem == 1)
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 21);
playerData[playerid][IsInArena2] = true;
playerData[playerid][IsInAArena] = true;
GivePlayerWeaponEx(playerid, WEAPON_DEAGLE, 6000);
GivePlayerWeaponEx(playerid, WEAPON_SAWEDOFF, 6000);
}
if(listitem == 2)
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 22);
playerData[playerid][IsInArena3] = true;
playerData[playerid][IsInAArena] = true;
GivePlayerWeaponEx(playerid, WEAPON_SHOTGSPA, 6000);
GivePlayerWeaponEx(playerid, WEAPON_MP5, 6000);
}
if(listitem == 3)
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 23);
playerData[playerid][IsInArena4] = true;
playerData[playerid][IsInAArena] = true;
GivePlayerWeaponEx(playerid, WEAPON_SNIPER, 6000);
GivePlayerWeaponEx(playerid, WEAPON_SAWEDOFF, 6000);
}
if(listitem == 4)
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 24);
playerData[playerid][IsInArena5] = true;
playerData[playerid][IsInAArena] = true;
GivePlayerWeaponEx(playerid, WEAPON_SNIPER, 6000);
GivePlayerWeaponEx(playerid, WEAPON_SHOTGSPA, 6000);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You cannot enter duel arena with wanted level!");
}
}
return 1;
}
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(playerid, 20);
}
else if(playerData[playerid][IsInArena2])
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 21);
}
else if(playerData[playerid][IsInArena3])
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 22);
}
else if(playerData[playerid][IsInArena4])
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 23);
}
else if(playerData[playerid][IsInArena5])
{
SetPlayerPos(playerid, -1410.72,1591.16,1052.53);
SetPlayerVirtualWorld(playerid, 24);
}
SendClientMessage(playerid, -1, "You spawned in a duel arena! use /leavearena to leave the duel arena!");
}
any solutions?