28.11.2010, 19:21
Serб que alguйm me consegue arranjar umas linhas de script, para por o meu comando /entrar, que serve para entrar em insides ( houses, business, buildings ) para tambйm dar para entrar no SPACE do teclado ?
if(strcmp(cmd, "/entrar", true) == 0) { for(new i = 0; i < sizeof(Houses); i++) { if(IsPlayerInRangeOfPoint(playerid,1.0,Houses[i][EnterX],Houses[i][EnterY],Houses[i][EnterZ])) { if(GetPlayerVirtualWorld(playerid) == Houses[i][EnterWorld]) { if(PlayerInfo[playerid][pHouseKey] == i || Houses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1) { SetPlayerInterior(playerid,Houses[i][ExitInterior]); SetPlayerPos(playerid,Houses[i][ExitX],Houses[i][ExitY],Houses[i][ExitZ]); SetPlayerVirtualWorld(playerid,i); SetPlayerFacingAngle(playerid,Houses[i][ExitAngle]); } else { GameTextForPlayer(playerid, "~r~Trancado", 5000, 1); } } } } |
if(newkeys & KEY_HANDBRAKE)
{
for(new i = 0; i < sizeof(Houses); i++)
{
if(IsPlayerInRangeOfPoint(playerid,1.0,Houses[i][EnterX],Houses[i][EnterY],Houses[i][EnterZ]))
{
if(GetPlayerVirtualWorld(playerid) == Houses[i][EnterWorld])
{
if(PlayerInfo[playerid][pHouseKey] == i || Houses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1)
{
SetPlayerInterior(playerid,Houses[i][ExitInterior]);
SetPlayerPos(playerid,Houses[i][ExitX],Houses[i][ExitY],Houses[i][ExitZ]);
SetPlayerVirtualWorld(playerid,i);
SetPlayerFacingAngle(playerid,Houses[i][ExitAngle]);
}
else
{
GameTextForPlayer(playerid, "~r~Trancado", 5000, 1);
}
}
}
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_HANDBRAKE) { for(new i = 0; i < sizeof(Houses); i++) { if(IsPlayerInRangeOfPoint(playerid,1.0,Houses[i][EnterX],Houses[i][EnterY],Houses[i][EnterZ])) { if(GetPlayerVirtualWorld(playerid) == Houses[i][EnterWorld]) { if(PlayerInfo[playerid][pHouseKey] == i || Houses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1) { SetPlayerInterior(playerid,Houses[i][ExitInterior]); SetPlayerPos(playerid,Houses[i][ExitX],Houses[i][ExitY],Houses[i][ExitZ]); SetPlayerVirtualWorld(playerid,i); SetPlayerFacingAngle(playerid,Houses[i][ExitAngle]); } else { GameTextForPlayer(playerid, "~r~Trancado", 5000, 1); } } } } |
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_HANDBRAKE) { for(new i = 0; i < sizeof(Houses); i++) { if(IsPlayerInRangeOfPoint(playerid,1.0,Houses[i][EnterX],Houses[i][EnterY],Houses[i][EnterZ])) { if(GetPlayerVirtualWorld(playerid) == Houses[i][EnterWorld]) { if(PlayerInfo[playerid][pHouseKey] == i || Houses[i][Locked] == 0 || PlayerInfo[playerid][pAdmin] >= 1) { SetPlayerInterior(playerid,Houses[i][ExitInterior]); SetPlayerPos(playerid,Houses[i][ExitX],Houses[i][ExitY],Houses[i][ExitZ]); SetPlayerVirtualWorld(playerid,i); SetPlayerFacingAngle(playerid,Houses[i][ExitAngle]); } } else { GameTextForPlayer(playerid, "~r~Trancado", 5000, 1); } } } } |