// Com Pickup
public OnGameModeInit() // se for um FilterScript Sу colocar no public OnFilterScriptInit()
{
Create3DTextLabel("Aperte Enter ou F Para Entrar", 0xFF4500AA, 1574.9576, -1881.1909, 13.5711, 25, 0, 50);
AddStaticPickup(1252, 1, 1574.9576, -1881.1909, 13.5711);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/comando 1", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1574.9576, -1881.1909, 13.5711)) //Onde o Player tem que estar para funcionar
{
SetPlayerPos(playerid, -2101.9099, 2711.2500, 166.7300); // Seta o Player para dentro do Interior
SetPlayerFacingAngle(playerid, 356.986358);
SetPlayerInterior(playerid, 17); // Mude aqui para o ID do seu Interior
return 1;
}
}
return 0;
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if ((newkeys==KEY_SECONDARY_ATTACK)) // Key ( F / Enter )
{
OnPlayerCommandText(playerid,"/comando 1"); // Ao Apertar "F" Funcionarб o Comando Do Lado.
OnPlayerCommandText(playerid,"/comando 2"); // Ao Apertar "F" Funcionarб o Comando Do Lado.
// Se Quiser Colocar mais, a vontade.
}
}
// na public OnPlayerKeyStateChange
if(newkeys == 16)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1574.9576, -1881.1909, 13.5711)
{
SetPlayerPos(playerid, -2101.9099, 2711.2500, 166.7300
}
}
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,1574.9576,-1881.1909,13.5711))
{
SetPlayerPos(playerid,-2101.9099,2711.2500,166.7300);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,1.0,2101.9099,2711.2500,166.7300))
{
SetPlayerPos(playerid,1574.9576,-1881.1909,13.5711);
return 1;
}
}
return 1;
}
@alex:
Cade o /comando 2 ? pawn Код:
|