[Ajuda] Problema Com Comando.
#6

pawn Код:
//variaveis globais
new
    bool: plr_in_ct_veh [ MAX_PLAYERS ],
    vehicle_ct [ MAX_PLAYERS ];


CMD:ct(playerid, params[])
{
    if(CSMBR[playerid] != ROCAM || CSMBR[playerid] != ROTA)
        return SCM(playerid, 0xAA3333AA, " VOCК NГO Й POLICIAL!");

    if ( plr_in_ct_veh [ playerid ] )
        DestroyVehicle ( vehicle_ct [ playerid ] );

    SetPlayerPos(playerid,1716.5999800,749.7999900,9.9000000);
    vehicle_ct [ playerid ] = CreateVehicle(523,1752.1411,683.9146,10.5176,92.5144,1,1,100000);
    PutPlayerInVehicle(playerid, vehicle_ct [ playerid ], 0);
    plr_in_ct_veh [ playerid ] = true;

    new
        Float: x,
        Float: y,
        Float: z;

    GetPlayerPos(playerid, x, y, z);
    PlayerPlaySound(playerid, 5201, x,y,z);
    GameTextForPlayer(playerid, "Seja bem vindo ao centro de treino da ROCAM.", 9000, 5);

    if(Blindado[vehicle_ct [ playerid ]] == true)
        RepairVehicle(vehicle_ct [ playerid ]);

    return 1;
}
Aprenda mais sobre variбveis e arrays.

--

Recomendo usar:

pawn Код:
plr_in_ct_veh [ playerid ] = false;
Quando o jogador sair do "CT".
Reply


Messages In This Thread
Problema Com Comando. - by davi54723 - 14.04.2013, 01:59
Re: Problema Com Comando. - by Gleisson_. - 14.04.2013, 02:13
Re: Problema Com Comando. - by Lуs - 14.04.2013, 02:14
Re: Problema Com Comando. - by Gleisson_. - 14.04.2013, 02:20
Re: Problema Com Comando. - by davi54723 - 14.04.2013, 07:55
Re: Problema Com Comando. - by Lуs - 14.04.2013, 08:48
Re: Problema Com Comando. - by davi54723 - 14.04.2013, 09:35
Re: Problema Com Comando. - by Lуs - 14.04.2013, 09:42
Re: Problema Com Comando. - by davi54723 - 14.04.2013, 09:45
Re: Problema Com Comando. - by Lуs - 14.04.2013, 10:03

Forum Jump:


Users browsing this thread: 1 Guest(s)