24.03.2012, 21:44
Boas malta,era o seguinte,tenho estes dois teleportes
Gostava de saber,como troco o comando por teclas,em vez de tar lб no jogo a escrever /entrargaragem2 e /sairgaragem2,clicava na tecla "H" e teleportasse-me logo. Ja vi cenas parecidas,mas eram com icones,e eu nao queria icones :S
pawn Код:
if(!strcmp(cmdtext,"/entrartunning2"))
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, -901.7835,2695.9102,42.3703))
return SendClientMessage(playerid,-1,"Vocк nгo estб na porta da garagem.");
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,1061.0157,2135.3223,10.82032);
}
SetPlayerPos(playerid,1061.0157,2135.3223,10.8203);
SetPlayerInterior(playerid,0);
return 1;
}
if(!strcmp(cmdtext,"/sairtunning2"))
{
if(!IsPlayerInRangeOfPoint(playerid, 10.0, 1061.0157,2135.3223,10.82032))
return SendClientMessage(playerid,-1,"Vocк nгo estб na garagem.");
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,-901.7835,2695.9102,42.3703);
}
SetPlayerPos(playerid,-901.7835,2695.9102,42.3703);
SetPlayerInterior(playerid,0);
return 1;
}