24.11.2013, 13:43
Hola, gostaria de saber eu fiz um sistema de teleporte, so que queria que teleportasse apertando "F" mais esta auto se teleportando, gostaria de ajuda:
Gracias.
pawn Код:
new armas1;
new sarmas1;
armas1 = CreatePickup(1318, 1, 1791.8861,-1163.1324,23.8281,-1);
sarmas1 = CreatePickup(1318, 1, 315.7863,-143.5840,999.6016,-1);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys==KEY_SECONDARY_ATTACK))
{
OnPlayerCommandReceived(playerid,"/entrandoint");
OnPlayerCommandReceived(playerid,"/sairdoint");
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == armas1)
{
SetPlayerPos(playerid, 315.761840, -143.515014, 999.601562);
SetPlayerInterior(playerid, 7);
}
if(pickupid == sarmas1)
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1791.8861,-1163.1324,23.8281);
}
return 1;
}
/* Comandos */
CMD:entrarint(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1791.8861,-1163.1324,23.8281))
{
SetPlayerPos(playerid, 315.761840, -143.515014, 999.601562);
SetPlayerInterior(playerid, 7);
}
return true;
}
CMD:sairint(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 315.761840, -143.515014, 999.601562))
{
SetPlayerPos(playerid, 1791.8861,-1163.1324,23.8281);
SetPlayerInterior(playerid, 7);
}
return true;
}