[DUV] onplayuerdeath -
rafa3dify - 13.07.2010
Ola pessoal, quando o player morrer, como faзo para verificar qual hospital ta mais perto e teletransportar ele para la.
Re: [DUV] onplayuerdeath -
felipex - 13.07.2010
Lol, so chute aq :
OnPlayerDeath :
Pega as coordenadas dos hospitais, e colocava if(IsPlayerInRangeOfPoint(playerid,distancia,x,y,z ))
aн assim vai :
if(IsPlayerInRangeOfPoint(playerid,distancia,x,y,z )) {
{
SetPlayerPos(playerid, x,y,z)
}
else if if(IsPlayerInRangeOfPoint(playerid,distancia,x,y,z ))
SetPlayerPos(playerid, x,y,z)
}
....) assim vai ...
nгo tenho certeza, so chute mesmo
Re: [DUV] onplayuerdeath -
rafa3dify - 13.07.2010
obrigado, deu certo, o unico poblema й que quando ele morrer, ele seta para o hospital, so que em vez de ficar la, ele dar spawn denovo.
Re: [DUV] onplayuerdeath -
felipex - 13.07.2010
Tenta coloca isso no OnPlayerSpawn =d , pq esse ai de fica й foda, ainda to trying aq
Re: [DUV] onplayuerdeath -
felipex - 13.07.2010
acho q achei um jeito..
Public OnPlayerDeath la :
if(IsPlayerInRangeOfPoint(playerid, distancia, x, y, z)) {
if(GetPlayerHealth(playerid) <= 0)
{
SetPlayerSpawnInfo(playerid, x,y,z);
}
else if(IsPlayerInRangeOfPoint(playerid, distancia, x, y, z)) {
}
return 1;
}
// assim vai, acho qe й assim , mo foda '-'
Re: [DUV] onplayuerdeath -
felipex - 13.07.2010
Distancia = distancia
x = coordenada x
y = coordenada y
z = coordernada z
o if(GetPlayerHealth(playerid) <= 0) quase 100% de certeza q num precisa a=
Re: [DUV] onplayuerdeath -
Lucas_Nicolas - 13.07.2010
Felipe para de double post,quer dizer triple post pode ser advertido com ban se continuar
Re: [DUV] onplayuerdeath -
felipex - 13.07.2010
malz ae, sempre esqueзo de algo u_u', e entrei a pouco tempo no forum, agora q vi aqueles botхes ali do lado pra edit
Re: [DUV] onplayuerdeath -
rafa3dify - 14.07.2010
nгo funciono, nao sei mais o que fazer.
Re: [DUV] onplayuerdeath -
zSuYaNw - 14.07.2010
Quote:
Originally Posted by felipex
acho q achei um jeito..
Public OnPlayerDeath la :
if(IsPlayerInRangeOfPoint(playerid, distancia, x, y, z)) {
if(GetPlayerHealth(playerid) <= 0)
{
SetPlayerSpawnInfo(playerid, x,y,z);
}
else if(IsPlayerInRangeOfPoint(playerid, distancia, x, y, z)) {
}
return 1;
}
// assim vai, acho qe й assim , mo foda '-'
|
use [*pawn] [/*pawn].
@topic
https://sampwiki.blast.hk/wiki/Main_Page_PT
--'