SA-MP Forums Archive
[AJUDA]Nгo estб checando direito!!! - 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]Nгo estб checando direito!!! (/showthread.php?tid=342138)



[AJUDA]Nгo estб checando direito!!! - Detonador - 12.05.2012

galerinha so pra avisar, o los ja me salvou xD!
ja me deu o q eu queria, so pra saberem q o problema ja foi resolvido.
vlws ae!


Re: [AJUDA]Nгo estб checando direito!!! - zbt - 12.05.2012

Vai saber se nгo й s0 , hehe.


Re: [AJUDA]Nгo estб checando direito!!! - Lуs - 12.05.2012

Tente assim:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        for(new c = 0; c < sizeof(carrosadm); c++)
        {
            new L_C = GetPlayerVehicleID(playerid);
            if(L_C == carrosadm[c])
            {
                if(!IsPlayerAdmin(playerid))
                {
                    new L_P[7]; GetVehicleParamsEx(L_C, L_P[0], L_P[1], L_P[2], L_P[3], L_P[4], L_P[5], L_P[6]);
                    SetVehicleParamsEx(L_C, 0, L_P[1], L_P[2], L_P[3], L_P[4], L_P[5], L_P[6]);
                    SendClientMessage(playerid, verde, "vc nao pode usar este veiculo!!!!!");
                    return 1;
                }
            }
        }
    }
    return 1;
}
Abraзos.


Re: [AJUDA]Nгo estб checando direito!!! - kazekene - 13.05.2012

Faz assim

Код:
new carrosadm[28];
Код:
IsAdmincar(carid)
{
	for(new i = 0; i < sizeof(carrosadm); i++)
	{
		if(carid == carrosadm[i]) return 1;
	}
	return 0;
}



Re: [AJUDA]Nгo estб checando direito!!! - Detonador - 13.05.2012

de boa galerinha, mas o Lуs jб me ajudou!
valeuzao a todos aк xD