[pedido] /carro [id] em STRCMP
#2

pawn Код:
if(!strcmp(cmdtext, "/carro", true))
{
    new string[128], tmp[128], idx; tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, COR_CINZA, "Use /carro [id do veiculo]");

    new car = strval(tmp);
    if(car < 400 || car > 611)
        return SendClientMessage(playerid, COR_VERMELHO, "ERRO: O nъmero do veнculo deve ser de 400 а 611.");

    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    new carid = CreateVehicle(car, X, Y, Z, 0.0, 0, 0, -1);
    LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
    SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
    PutPlayerInVehicle(playerid, carid, 0);
    format(string, sizeof(string), "Veнculo %d, criado.", carid);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Reply


Messages In This Thread
[pedido] /carro [id] em STRCMP - by Panico622 - 08.03.2012, 20:01
Re: [pedido] /carro [id] em STRCMP - by paulor - 08.03.2012, 20:48
Re: [pedido] /carro [id] em STRCMP - by Panico622 - 08.03.2012, 20:52
Re: [pedido] /carro [id] em STRCMP - by paulor - 08.03.2012, 20:57
Re: [pedido] /carro [id] em STRCMP - by Panico622 - 08.03.2012, 20:59
Re: [pedido] /carro [id] em STRCMP - by Panico622 - 08.03.2012, 21:04
Re: [pedido] /carro [id] em STRCMP - by paulor - 08.03.2012, 21:11
Re: [pedido] /carro [id] em STRCMP - by Panico622 - 08.03.2012, 21:16
Re: [pedido] /carro [id] em STRCMP - by paulor - 08.03.2012, 21:21

Forum Jump:


Users browsing this thread: 3 Guest(s)