[AJUDA] WARNING OnVehicleDamageStatusUpdate
#1

Opa, me cadastrei a poco tempo no fуrum, hoje foi aprovado o cadastro.
Bom to com um problema, baixei um FS do Drakon, de Cinto seguranзa, e nгo funciona.

Na hora de compilar da um warning:

warning 235: public function lacks forward declaration (symbol "OnVehicleDamageStatusUpdate")
-=-
Nгo sei se esse warning й o responsavel pelo nгo funcionamento do FS, pois la nгo funciona nada, nem um sinal do sistema, deve ser o warning. Me ajudem
-
Abaixo o Link do FS
http://forum.sa-mp.com/showthread.ph...ght=tirarcinto

=
Tenho mais outras duvidas tambйm, queria um FS DE SALVAR POSIЗГO DO PLAYER QUANDO SAIR DO SERVIDOR, QNDO VOLTAR ESTAR NO LUGAR KE SAIU, ETC...
=
T+
Reply
#2

Atualiza seus includes do Sa:Mp, assim copilando.
Reply
#3

tenta botar no comeзo do gm:
pawn Код:
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
Reply
#4

Quote:

tenta botar no comeзo do gm:
pawn Code:
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);

Obrigado deu certo.

-=-
Quote:

Atualiza seus includes do Sa:Mp, assim copilando.

Garfield, eu nгo acho os includes atualizados, quero baixar todos, pois tenho um FS DE SAVING POSITION PLAYER, ele da erro na hora de compilar. Erб o Dudb, ai atualizei e agуra й outro. etc..

Vou testar o FS e aviso aqui oque deu.
Reply
#5

Quote:

//•••••••••••••••••••••••••••••••••••••••••••••••••• ••
//••
#include <a_samp>
#define MEUS_SLOTS 20
//************ Cores **************************
#define AMARELO 0xFFFF00AA
#define VERDE 0x33AA33A
//********** Arrays ***************************
new CintoPlayer[MEUS_SLOTS];
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
//***************** CallBakcs (Detectar Batida *****************
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
if(CintoPlayer[playerid] == 0)
{
new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000, Float:HV ;
GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
GetVehicleHealth(vehicleid,HV);
SetPlayerHealth(playerid,HV/10);
SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
RemovePlayerFromVehicle(playerid);//REMOVE VEICULO
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer");
SetTimer("ANIM",5000,0);
SetPlayerWantedLevel(playerid, 1);
}
return 1;
}
//************ CallBacks Para Anims **************************
forward ANIM(playerid);
public ANIM(playerid)
{
ClearAnimations(playerid);
return 1;
}
//*************** Call Backs Entra Veiculos ******************
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
CintoPlayer[playerid] = 0;
GameTextForPlayer(playerid, "~r~/cinto Caso Contrario ~n~Morrer em Batidas", 3000, 4);
return 1;
}
//******** Call Backs Comandos *******************************
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/cinto", true))
{
CintoPlayer[playerid] = 1;
SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
SetPlayerWantedLevel(playerid, 0);
return 1;
}
if(!strcmp(cmdtext, "/tirarcinto", true))
{
CintoPlayer[playerid] = 0;
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
SetPlayerWantedLevel(playerid, 0);
return 1;
}
return 0;
}
//*************** The End *************************************

Deu Sinal de Vida, mas ainda tem alguns erros:
1є /cinto e /tirarcinto da pra usar varias vezes mesmo ja estando com o cmd ativado.
2єPara usar o /cinto ou /tirarcinto nгo precisa estar em nenhum veнculo.
3єNгo perde Vida ao Bater por mais forte que seja.
Reply
#6

Porra nihuma, baixa outro melhor =D
Reply
#7

Iae matheus kkk, tipo tem outro FS ainda pra tirar umas duvidas, primeiro quero resolver este... esperando alguem ajudar ;p
Reply
#8

=d, o proprio

Drakon
Reply
#9

@Marshall_Elite

Dei uma Level Atualizada para o Senhor

pawn Код:
//•••••••••••••••••••••••••••••••••••••••••••••••••• ••
//••
#include <a_samp>
#define MEUS_SLOTS 20
//************ Cores **************************
#define AMARELO 0xFFFF00AA
#define VERDE 0x33AA33A
//********** Arrays ***************************
new CintoPlayer[MEUS_SLOTS];
//********** Definir Public *********************
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
//***************** CallBakcs (Detectar Batida *****************
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
if(CintoPlayer[playerid] == 0)
{
new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000, Float:HV ;
GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
GetVehicleHealth(vehicleid,HV);
SetPlayerHealth(playerid,HV/10);
SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
RemovePlayerFromVehicle(playerid);//REMOVE VEICULO
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer");
SetTimer("ANIM",5000,0);
SetPlayerWantedLevel(playerid, 1);
}
return 1;
}
//************ CallBacks Para Anims **************************
forward ANIM(playerid);
public ANIM(playerid)
{
ClearAnimations(playerid);
return 1;
}
//*************** Call Backs Entra Veiculos ******************
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
CintoPlayer[playerid] = 0;
GameTextForPlayer(playerid, "~r~/cinto ~w~ Caso Contrario ~n~Morrer em Batidas", 3000, 4);
return 1;
}
//**************** Nгo Deixar Sair do Carro **********************
public OnPlayerExitVehicle(playerid, vehicleid)
{
  if(CintoPlayer[playerid]==1)
  {
     SendClientMessage(playerid,0x00FF00AA,"Vocк Esta de Cinto,Tire-O");
     PutPlayerInVehicle(playerid, vehicleid, 0);
  }
  return 1;
}
//******** Call Backs Comandos *******************************
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/cinto", true))
{
if(CintoPlayer[playerid]==1) return SendClientMessage(playerid,0x00FF00AA,"Vocк ja esta de Cinto");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x00FF00AA,"Vocк nгo esta em um Carro");
CintoPlayer[playerid] = 1;
SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
SetPlayerWantedLevel(playerid, 0);
return 1;
}
if(!strcmp(cmdtext, "/tirarcinto", true))
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,0x00FF00AA,"Vocк nгo esta em um Carro");
if(CintoPlayer[playerid]==0) return SendClientMessage(playerid,0x00FF00AA,"Vocк nгo esta de Cinto");
CintoPlayer[playerid] = 0;
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
SetPlayerWantedLevel(playerid, 0);
return 1;
}
return 0;
}
//*************** The End *************************************
Desculpa os Bugs Toscos eu fiz Isso em um Brincandeira com algumas Animes com Crack nгo achei que iria Interessar Tanto..
Reply
#10

Drakon, ainda tem um ERRO, quando eu bato sem cinto. nгo perco vida nenhuma , nem mesmo com maior forзa
Obrigado por vir aqui resolver alguns bugs, obrigado por se interessar em me ajudar, agуra sу falta sair LIFE do player quando bate se poder ajudar agradeзo.
Reply
#11

\o Elite Brothers
Reply
#12

Atualizei olha lб no Tуpico Oficial
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)