[AJUDA] Help-Me *-*
#1

Oi Gente ..

Tipo Vim Aki Fazer Dinovo A Pergunta Mais Ninguem Me Respondeu =/

Queria Saber Um [FS] Ou Um [COD] Para Criar Carro Exemplo

/Carro [Nome/ID] [Cor1] [Cor2]

Ou Pode Ser Em Ingles Mesmo ..

/Car [Name/ID] [Color1] [Color2]

------------------------------------------------------------------

Achei O ingles Mais Axei So Com O ID, Sу Que Tem Uns Players Que Nao Sabem O ID Dos Carros, Ai E Melhor Digitar O Nome ..

Por Favor Me Ajude?
Reply
#2

Search - > !
Reply
#3

lol
esse й o comando que mais tem no forum samp o.o
vc realmente n ta sabendo pesquisar o.o
Reply
#4

Eu Que Fiz
pawn Код:
if(strcmp(cmd, "/veiculo", true) == 0)
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
        return 1;
    }
    new ID;
    ID = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
        return 1;
    }
    new Cor1;
    Cor1 = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
        return 1;
    }
    new Cor2;
    Cor2 = strval(tmp);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    CreateVehicle(ID, X+2, Y, Z, 0.0, Cor1, Cor2, 60000);
    SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
    return 1;
}
Reply
#5

Tiago Deu Errors ..

Код:
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(479) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(479) : error 017: undefined symbol "strtok"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(480) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(486) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(487) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(487) : error 017: undefined symbol "strtok"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(488) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(494) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(495) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(495) : error 017: undefined symbol "strtok"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(496) : error 017: undefined symbol "tmp"
D:\Duany\SAMP - TPD\gamemodes\TPD.pwn(502) : error 017: undefined symbol "tmp"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.
@Kasura

Te Tem Muitos O Problema Й Que Alguns Nao Vem Akele Pra Colocar O Nome, E Outros E Somente Pra Admin .. Se Vocк Achar Poste Aqui O Link
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new tmp[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/veiculo", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
            return 1;
        }
        new ID;
        ID = strval(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
            return 1;
        }
        new Cor1;
        Cor1 = strval(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
            return 1;
        }
        new Cor2;
        Cor2 = strval(tmp);
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(ID, X+2, Y, Z, 0.0, Cor1, Cor2, 60000);
        SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
        return 1;
    }
    return 0;
}

strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)