23/09/2022 16:40
(Esta mensagem foi modificada pela última vez a: 23/09/2022 17:12 por RosaScripter.)
Ao player entrar em um interior dar nisso
Se volta o normal depois que o jogador sai do interior, quem souber oq faz isso acontecer ajude ai
deixar o codigo ai
Se volta o normal depois que o jogador sai do interior, quem souber oq faz isso acontecer ajude ai
deixar o codigo ai
Código PHP:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/entrar", true, 3)) // Comando ( Não Importa Vamos Usar o F )
{
if(pLogado[playerid] == false) return SendClientMessage(playerid, CorErro, "{FF0000}SERVER {FFFFFF}Necesitas iniciar sesion primero.");
if(PlayerToPoint(3.0, playerid, 914.2192,-1004.6276,37.9795))//Ayuntamiento
{
SetPlayerPos(playerid, 1428.3633,-1916.4885,1227.9059);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1154.107543, -1772.678588, 16.593750))//Agencia
{
SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1172.0829,-1323.5533,15.4034))//Hospital
{
SetPlayerPos(playerid, 1176.3602,-1326.3590,-44.2836);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
}
if(PlayerToPoint(3.0, playerid, 2105.4880,-1806.2786,13.5547))//Cafeteria
{
SetPlayerPos(playerid, 372.2827,-133.5237,1001.4922);
SetPlayerInterior(playerid, 5);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1369.0006,-1279.6953,13.5469))//Loja De Armas
{
SetPlayerPos(playerid, 285.8804,-86.7819,1001.5229);
SetPlayerInterior(playerid, 4);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1555.4982,-1676.1260,16.1953))//LSPD
{
SetPlayerPos(playerid, 246.783996,63.900199,1003.640625);
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1734.6909,-1265.3292,13.5420))//Licencas
{
SetPlayerPos(playerid, -2026.7869,-103.6062,1035.1816);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1489.3138,-1719.4442,8.2429))//Mercado Negro
{
SetPlayerPos(playerid, 1990.3617,1116.2991,1122.5159);
SetPlayerInterior(playerid, 26);
SetPlayerVirtualWorld(playerid, 0);
LoadObjects(playerid);
return 1;
}
return 1;
}
if(strcmp(cmdtext, "/sair", true, 3)) // Comando (no importa usemos F)
{
if(pLogado[playerid] == false) return SendClientMessage(playerid, CorErro, "{FF0000}SERVER {FFFFFF}Necesitas iniciar sesion primero.");
if(PlayerToPoint(3.0, playerid, 1428.3633,-1916.4885,1227.9059))//Prefeitura
{
SetPlayerPos(playerid, 914.2192,-1004.6276,37.9795);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1494.325195,1304.942871,1093.289062))//Agencia
{
SetPlayerPos(playerid, 1154.107543, -1772.678588, 16.593750);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1176.3602,-1326.3590,-44.2836))//Hospital
{
SetPlayerPos(playerid, 1172.0829,-1323.5533,15.4034);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
if(PlayerToPoint(3.0, playerid, 372.2827,-133.5237,1001.4922))//Cafeteria
{
SetPlayerPos(playerid, 2105.4880,-1806.2786,13.5547);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, 285.8804,-86.7819,1001.5229))//Loja de Armas
{
SetPlayerPos(playerid, 1369.0006,-1279.6953,13.5469);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, 246.783996,63.900199,1003.640625))//LSPD
{
SetPlayerPos(playerid, 1555.4982,-1676.1260,16.1953);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, -2026.7869,-103.6062,1035.1816))//Licencas
{
SetPlayerPos(playerid, 1734.6909,-1265.3292,13.5420);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(PlayerToPoint(3.0, playerid, 1990.3617,1116.2991,1122.5159))//Loja de Roupa
{
SetPlayerPos(playerid, 1489.3138,-1719.4442,8.2429);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
return 1;
}
return 1;
}
Código PHP:
if(newkeys == KEY_YES) // Key ( F / Enter )
{
OnPlayerCommandText(playerid,"/entrar"); //Al presionar "F" funcionará el comando en el lateral.
OnPlayerCommandText(playerid,"/sair"); // Al presionar "F" funcionará el comando en el lateral.
// Si quieres añadir más, siéntete libre.
if(GetPVarInt(playerid,"cameramode") == 1)
{
for(new i = 0; i < 32; i++) TextDrawHideForPlayer(playerid,Galaxy3Camera[i]);
GalaxyS3Phone(playerid,1);
for(new i = 0; i < 11; i++) TextDrawShowForPlayer(playerid,Galaxy3StartMenu[i]);
PlayerTextDrawShow(playerid,Galaxy3StartMenu2);
for(new i = 0; i < 12; i++) TextDrawShowForPlayer(playerid,Galaxy3SMainMenu[i]);
SelectTextDraw(playerid,0x33AA33AA);
DeletePVar(playerid,"cameramode");
SetCameraBehindPlayer(playerid);
DestroyObject(firstpersona[playerid]);
}
}