20.09.2010, 04:02
Como hago un comando de teletrasportacion pero sin dejar el auto que me lleve con el vehiculo?
if(strcmp(cmdtext, "/comando", true) == 0){
if(!IsPlayerInVehicle(playerid))return SetPlayerPos(playerid, 0.0, 0.0, 0.0);
else return SetVehiclePos(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
}
podes hacer algo asi:
pawn Код:
|
[Pawn] [*/Pawn]
if(strcmp(cmdtext, "/comando", true) == 0){
if(!IsPlayerInAnyVehicle(playerid))return SetPlayerPos(playerid, 0.0, 0.0, 0.0);
else return SetVehiclePos(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.0);
}
if(strcmp(cmd, "/drift", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health >= 80)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, -302.55, 1512.47, 75.360);
}
else
{
SetVehiclePos(GetPlayerVehicleID(playerid), -302.55, 1512.47, 75.360);
}
SendClientMessage(playerid, COLOR_GREEN, "Has sido transportado a Drift" );
}
else
{
SendClientMessage(playerid, 0xAA3333AA, "Para usar el teleport llena tu vida antes");
}
return 1;
}