[Ajuda] Carro para admin
#1

alguem sabe me informa se tem como colocacar um carro exclusivo para admin ...se tiver me ajudem pf
Reply
#2

pawn Код:
new AdminCars[4]; // Defina isto no topo do GM se tiver 9 carros vocк pхe 10,se tiver 2 carros vocк pхe 3 e assim...
pawn Код:
public OnGameModeInit()
{
AdminCars[0] = AddStaticVehicleEx(496,1660.1147,-1611.1470,13.2624,358.9430,124,103,90000);
AdminCars[1] = AddStaticVehicleEx(411,1650.9912,-1611.0281,13.2893,0.4947,105,107,90000);
AdminCars[2] = AddStaticVehicleEx(429,1642.2440,-1611.2413,13.2931,359.9989,126,126,90000);
AdminCars[3] = AddStaticVehicleEx(424,1632.1814,-1610.8914,13.4915,359.4896,1,0,90000);
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{   if(vid==AdminCars[0]||vid==AdminCars[1]||vid==AdminCars[2]||vid==AdminCars[3])
        {
            if(PlayerInfo[playerid][pAdmin] == 1) { }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"   Vocк nгo й Admin!"); // Mostra a msg pro cara
                RemovePlayerFromVehicle(playerid);//Tira o cara do veiculo
                TogglePlayerControllable(playerid, 1);//deixa ele com movimento (playerid, 0) deixa ele congelado
            }
        }
Prуxima vez usa o search!
Reply
#3

Se o seu sistema de admin for atravйs da RCON pode use o IsPlayerAdmin ao invйs do PlayerInfo.
Reply
#4

no topo

Код:
forward IsAadm(playerid);
forward IsAadmCar(carid);
em
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
pawn Код:
if(IsAadmCar(newcar))
        {
            if(IsAadm(playerid)) { }
            else {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, COLOR_ROSA, "Voce nгo й um Admin ou nгo estб em Modo Trabalho!"); }
        }
cria as public
pawn Код:
public IsAadm(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        new Admin = PlayerInfo[playerid][pAdmin];//aqui verifica se й adm
        if(Admin >= 1)//
        {
            return 1;
        }
    }
    return 0;
}

public IsAadmCar(carid)
{
    if((carid >= AQUI) && (carid <= AQUI))// numero dos carros que serгo de adm.....
    {
        return 1;
    }
    return 0;
}
Reply
#5

Код:
cara eu n sei o que aconteceu... Sу sei que esta dando um ERRO "vid" 
(C:\Users\usuario XD\Desktop\Servidor\Server de test\brasil_play_fortes_rpg_homehots_net_www.homehots.net\Brasil Play Fortes RPG HomeHots.net\gamemodes\PlayFortes.pwn(13514) : error 017: undefined symbol "vid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.)

Da um olhada

// Carros ADM

new AdminCars[15];



public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(vid==AdminCars[0]||vid==AdminCars[1]||vid==AdminCars[2]||vid==AdminCars[3]||vid==AdminCars[4]||vid==AdminCars[5]||vid==AdminCars[6]||vid==AdminCars[7]||vid==AdminCars[8]||vid==AdminCars[9]||vid==AdminCars[10]||vid==AdminCars[11]||vid==AdminCars[12]||vid==AdminCars[13]||)
        {
            if(PlayerInfo[playerid][pAdmin] == 1) { }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"O que vc Pensa que esta fazendo?!"); // Mostra a msg pro cara
                RemovePlayerFromVehicle(playerid);//Tira o cara do veiculo
                TogglePlayerControllable(playerid, 1);//deixa ele com movimento (playerid, 0) deixa ele congelado
            }
        }


public OnGameModeInit()
{
AdminCars[0] = AddStaticVehicleEx(520,51.8000000,1510.1999500,14.5000000,86.0000000,-1,-1,15); //Hydra
AdminCars[1] = AddStaticVehicleEx(520,48.1000000,1540.0000000,14.2000000,94.0000000,-1,-1,15); //Hydra
AdminCars[2] = AddStaticVehicleEx(451,-8.6000000,1565.5000000,12.8000000,172.0000000,-1,-1,15); //Turismo
AdminCars[3] = AddStaticVehicleEx(411,-5.6000000,1564.8000500,12.9000000,170.0000000,255,5,15); //Infernus
AdminCars[4] = AddStaticVehicleEx(415,-2.0000000,1564.0999800,12.9000000,170.0000000,3,-1,15); //Cheetah
AdminCars[5] = AddStaticVehicleEx(429,9.9000000,1562.9000200,12.8000000,180.0000000,255,255,15); //Banshee
AdminCars[6] = AddStaticVehicleEx(506,13.1000000,1562.8000500,12.8000000,178.0000000,26,-1,15); //Super GT
AdminCars[7] = AddStaticVehicleEx(559,16.6000000,1562.3000500,12.8000000,178.0000000,208,222,15); //Jester
AdminCars[8] = AddStaticVehicleEx(425,-17.1000000,1500.3000500,16.5000000,0.0000000,-1,-1,15); //Hunter
AdminCars[9] = AddStaticVehicleEx(535,37.5000000,1552.5999800,12.9000000,90.0000000,245,-1,15); //Slamvan
AdminCars[10] = AddStaticVehicleEx(494,28.0000000,1559.1999500,12.7000000,168.0000000,238,255,15); //Hotring
AdminCars[11] = AddStaticVehicleEx(557,33.4000000,1524.9000200,13.6000000,90.0000000,255,255,15); //Monster B
AdminCars[12] = AddStaticVehicleEx(463,31.0000000,1558.6999500,12.6000000,174.0000000,-1,-1,15); //Freeway
AdminCars[13] = AddStaticVehicleEx(522,33.4000000,1558.8000500,12.6000000,169.5000000,233,255,15); //NRG-500
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)