Portal SAMP
[Ajuda] nao cair da moto - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] nao cair da moto (/showthread.php?tid=2472)



nao cair da moto - spongebob - 12/06/2022

tava tentando fazer uma anti-fall com a  include "callbacks"  .
Código:
#include <a_samp>
#include <callbacks>

public OnPlayerFall(playerid, Float:damage)
{
    return 1;
}

public OnPlayerCrashVehicle(playerid, vehicleid, Float:damage)
{
new vid = GetPlayerVehicleID(playerid);
PutPlayerInVehicle(playerid,vid,0);
return 1;
}

ao tentar compilar tenho isso:
C:\Users\leo\Desktop\Server037\pawno\include\callbacks.inc(363) : error 017: undefined symbol "GetPlayerPoolSize"
C:\Users\leo\Desktop\Server037\pawno\include\callbacks.inc(940) : error 017: undefined symbol "GetVehiclePoolSize"
C:\Users\leo\Desktop\Server037\pawno\include\callbacks.inc(1153) : error 017: undefined symbol "GetPlayerPoolSize"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.


RE: nao cair da moto - OTAKEIRO - 12/06/2022

Antes de incluir verifica se essa função esta incluida
Código:
#if !defined GetPlayerPoolSize
    native GetPlayerPoolSize();
#endif



RE: nao cair da moto - Dr Editor - 12/06/2022

(12/06/2022 22:08)OTAKEIRO Escreveu: Antes de incluir verifica se essa função esta incluida
Código:
#if !defined GetPlayerPoolSize
    native GetPlayerPoolSize();
#endif

Essa nativa, diferente de IsValidVehicle, já está incluída no samp-server.

@TOPIC

Atualize a versão do samp server para 0.3.7.


RE: nao cair da moto - spongebob - 12/06/2022

(12/06/2022 22:52)Dr Editor Escreveu:
(12/06/2022 22:08)OTAKEIRO Escreveu: Antes de incluir verifica se essa função esta incluida
Código:
#if !defined GetPlayerPoolSize
    native GetPlayerPoolSize();
#endif

Essa nativa, diferente de IsValidVehicle, já está incluída no samp-server.

@TOPIC

Atualize a versão do samp server para 0.3.7.

a versão do server é 0.3.7

(12/06/2022 22:08)OTAKEIRO Escreveu: Antes de incluir verifica se essa função esta incluida
Código:
#if !defined GetPlayerPoolSize
    native GetPlayerPoolSize();
#endif

vlw


RE: nao cair da moto - xbruno1000x - 12/06/2022

Esse erro é de include por não encontrar a função GetPlayerPoolSize nos arquivos. Confira se todas includes nativas estão atualizadas para a última versão do SA-MP 0.3.7.


RE: nao cair da moto - spongebob - 13/06/2022

(12/06/2022 23:22)xbruno1000x Escreveu: Esse erro é de include por não encontrar a função GetPlayerPoolSize nos arquivos. Confira se todas includes nativas estão atualizadas para a última versão do SA-MP 0.3.7.

coloquei :
Código:
#if !defined GetPlayerPoolSize
    native GetPlayerPoolSize();
    native GetVehiclePoolSize();
#endif
antes das includes como o cara acima falo e funcionou consegui compilar mais não consegui fazer um anti-fall então
removi a include"callbacks" e usei essa public
Código:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
    {
        if(GetVehicleModel(VeiculoID[playerid]) == 522){
        PutPlayerInVehicle(playerid,VeiculoID[playerid],0);}

não ta perfeito mais ate que ficou bom então resolvido vlw.