SA-MP Forums Archive
[Ajuda] Sem Habilitaзгo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Sem Habilitaзгo (/showthread.php?tid=449627)



Sem Habilitaзгo - clerISoN - 09.07.2013

Ae galera to tentando fazer um sistema de habilitaзгo aqui no meu GM, mas nгo estou conseguindo.

Eu criei uma variбvel new Terrestre[MAX_PLAYERS];

Coloquei ela em:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(Terrestre[playerid] == 0){
    return
    RemovePlayerFromVehicle(playerid),
    SendClientMessage(playerid, CorErro, "(ERRO) Vocк nгo tem habilitaзгo terrestre, entгo nгo pode dirigir um carro!");
    }
    return 1;
}
Para quando ele entrar no veнculo, ser removido do mesmo e receber uma mensagem, so que aparece 2 mensagens.

Podem min dizer por que ? Ah e quando eu Spawno no server aparece a mensagem 2 vezes tbm ;/

Obrigado desde jб!


Re: Sem Habilitaзгo - Gii - 09.07.2013

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {

    if (newstate == PLAYER_STATE_DRIVER && Terrestre[playerid] == 0) {
   
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, CorErro, "(ERRO) Vocк nгo tem habilitaзгo terrestre, entгo nгo pode dirigir um carro!");
        return true;
    }
    return true;
}



Re: Sem Habilitaзгo - clerISoN - 09.07.2013

Vlw Castiel ;Р

Ah, como coloco sу para carros, tirando aviхes, helicуpteros e barcos ?


Re: Sem Habilitaзгo - Gii - 09.07.2013

Quote:
Originally Posted by clerISoN
Посмотреть сообщение
Vlw Castiel ;Р

Ah, como coloco sу para carros, tirando aviхes, helicуpteros e barcos ?
https://sampforum.blast.hk/showthread.php?tid=94282