[Ajuda] Ajuda no GameTextForPlayer
#5

Quote:
Originally Posted by Japis
Посмотреть сообщение
Tente substituir seu sistema por este

topo gm
Код:
forward UpdatePlayecar(playerid);
new bool:Playercar[MAX_PLAYERS];
new PlayerTimerCar[MAX_PLAYERS];
OnPlayerDisconnect:
Код:
if (Playercar[playerid]) {
            KillTimer(PlayerTimerCar[playerid]);
        }
final da gm:

Код:
public UpdatePlayercar(playerid) {

	new playervehicle;

	if ( (playervehicle = GetPlayerVehicleID(playerid)) != INVALID_VEHICLE_ID) {

		new string_velo[15];
    	new  lu, alar, por, cap, porma, ob;
		new carro = GetPlayerVehicleID(playerid);
		static Float:health;
		GetVehicleHealth(GetPlayerVehicleID(playerid),health);
		if(health <= 350)
		{

			SendClientMessage(playerid, VERMELHO_COR, "Seu motor estragou");
 			SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
                        HidePlayercar(playerid);
 			Playercar[playerid] = false ;
                        KillTimer(PlayerTimerCar[playerid]);
			return 0;
		}
}
	return 1;
}
public OnPlayerStateChange
Код:
  if ( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
		ParouDeFunfar(playerid) ;
	} else {
		HidePlayercar(playerid) ;
	}
final da gm
Код:
stock ParouDeFunfar(playerid) {
        if ( Playercar[playerid] ) {
            return 0;
        }

        Playercar[playerid] = true ;
        PlayerTimerCar[playerid] = SetTimerEx("UpdatePlayercar", 100, true, "i", playerid);
        return 1;
}

stock HidePlayercar(playerid) {
        if ( !Playercar[playerid] ) {
            return 0;
        }
        Playercar[playerid] = false ;
        KillTimer(PlayerTimerCar[playerid]);
        return 1;
}
Ficou assim:
Код:
F:\Users\krosmo\Desktop\samp GM\gamemodes\SSAML.pwn(287) : warning 235: public function lacks forward declaration (symbol "UpdatePlayercar")
F:\Users\krosmo\Desktop\samp GM\gamemodes\SSAML.pwn(293) : warning 204: symbol is assigned a value that is never used: "string_velo"
F:\Users\krosmo\Desktop\samp GM\gamemodes\SSAML.pwn(291) : warning 204: symbol is assigned a value that is never used: "playervehicle"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Reply


Messages In This Thread
Ajuda no GameTextForPlayer - by KrosmoStewart - 16.02.2019, 19:30
Re: Ajuda no GameTextForPlayer - by AutoMatic2 - 16.02.2019, 19:35
Re: Ajuda no GameTextForPlayer - by KrosmoStewart - 16.02.2019, 19:42
Re: Ajuda no GameTextForPlayer - by Japis - 16.02.2019, 20:49
Re: Ajuda no GameTextForPlayer - by KrosmoStewart - 16.02.2019, 21:13
Re: Ajuda no GameTextForPlayer - by Japis - 16.02.2019, 21:22
Re: Ajuda no GameTextForPlayer - by KrosmoStewart - 16.02.2019, 21:30
Re: Ajuda no GameTextForPlayer - by Japis - 16.02.2019, 21:36
Re: Ajuda no GameTextForPlayer - by KrosmoStewart - 16.02.2019, 21:40
Re: Ajuda no GameTextForPlayer - by KrosmoStewart - 17.02.2019, 00:11

Forum Jump:


Users browsing this thread: 3 Guest(s)