interior = CreatePickup(pickupid, 1, X,Y,Z, -1);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_SECONDARY_ATTACK)) // Key ( F / Enter )
{
OnPlayerCommandText(playerid,"/entrar"); // Ao Apertar "F" Funcionarб o Comando Do Lado.
OnPlayerCommandText(playerid,"/sair"); // Ao Apertar "F" Funcionarб o Comando Do Lado.
}
return 1;
}
CMD:entrar(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.0200,-1772.6787,16.5992))
{
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid,1491.8854,1305.9750,1093.2964); // Setado Para Aqui ( TELE )
}
return 1;
}
CMD:sair(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.3815,1303.5789,1093.2891))
{
SetPlayerInterior(playerid, 0); // Setando o Interior ao Sair.
SetPlayerPos(playerid, 1154.0200,-1772.6787,16.5992); // Setado Para Aqui ( TELE )
}
return 1;
}
OnPlayerCommandText(playerid,"/entrar");
cmd_entrar(playerid);
troque isso
pawn Код:
pawn Код:
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1154.0200,-1772.6787,16.5992)) {
SetPlayerInterior(playerid, 3);
SetPlayerPos(playerid,1491.8854,1305.9750,1093.2964);
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1494.3815,1303.5789,1093.2891)) {
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1154.0200,-1772.6787,16.5992);
}
}
return 1;
}
Mais eu to usando o ZCMD, e nгo o OnplayerCommandText. Ajude-me, pff kk
|
return cmd_entrar(playerid);