19.08.2012, 10:39
Boas й o seguinte eu gostaria de criar um comando de /irgaragem,eu tenho coordenadas,sei fazer o comando,mas a garagem ficno interior 1,como seto o teleporte pro int 1?
SetPlayerInterior(playerid, 1);
if (strcmp("/irgaragem", cmdtext, true) == 0) //DIALOG PREMIOS
{
SetPlayerPos(playerid, X, Y, Z); //TROQUE PELAS COORDENADAS DO TELEPORTE
SetPlayerInterior(playerid, 1); //INTERIOR, NO CASO [1]
SendClientMessage(playerid, -1, "{FF3D3D}[INFO]{FFFFFF} Vocк foi para a garagem!"); //MENSAGEM
return 1;
}
if (strcmp("/et", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][msFaction] != 255 && DynamicFactions[PlayerInfo[playerid][msFaction]][fType] == 7)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2531.9199,-19.4328,16.1298))
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
new rmpcar = GetVehicleTrailer(tmpcar);
if(rmpcar != 0)
{
SetVehiclePos(tmpcar, 2208.3252,1552.4418,1007.2502);
SetVehicleZAngle(tmpcar, 271.1434);
LinkVehicleToInterior(tmpcar, 1);
}
else
{
SetVehiclePos(tmpcar, 2208.3252,1552.4418,1007.2502);
SetVehicleZAngle(tmpcar, 271.1434);
LinkVehicleToInterior(tmpcar, 1);
}
}
else
{
SetPlayerPos(playerid, 2208.3252,1552.4418,1007.2502);
SetPlayerInterior(playerid,1);
}
return 1;
}
return 1;
}
return 1;
}
return 1;
}
if (strcmp("/et", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid)
{
if(PlayerInfo[playerid][msFaction] != 255 && DynamicFactions[PlayerInfo[playerid][msFaction]][fType] == 7)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2531.9199,-19.4328,16.1298)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
new rmpcar = GetVehicleTrailer(tmpcar);
if(rmpcar != 0)
{
SetVehiclePos(tmpcar, 2208.3252,1552.4418,1007.2502);
SetVehicleZAngle(tmpcar, 271.1434);
LinkVehicleToInterior(tmpcar, 1);
}
else
{
SetVehiclePos(tmpcar, 2208.3252,1552.4418,1007.2502);
SetVehicleZAngle(tmpcar, 271.1434);
LinkVehicleToInterior(tmpcar, 1);
}
else if(!IsPlayerInAnyVehicle(playerid)
{
SetPlayerPos(playerid, 2208.3252,1552.4418,1007.2502);
SetPlayerInterior(playerid,1);
}
}
}
}
return 1;
}
if(!strcmp(cmdtext, "/entrargaragem", true))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2531.9199,-19.4328,16.1298))
{
SetPlayerInterior(playerid, 1);
if(GetPlayerVehicleSeat(playerid))
{
SetPlayerPos(playerid, 2208.3252,1552.4418,1007.2502);
}
else
{
new Veiculo = GetPlayerVehicleID(playerid);
SetVehiclePos(Veiculo, 2208.3252,1552.4418,1007.2502);
SetVehicleZAngle(Veiculo, 271.1434);
LinkVehicleToInterior(Veiculo, 1);
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFAA, "Vocк nгo estб no lugar certo !");
}
return 1;
}