[AJUDA]Goto e Salvar posiзгo
#4

Quote:
Originally Posted by Willian_Luigi
View Post
pawn Code:
//TOPO
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;
}
//OnPlayerCommandText
new string[128],
cmd[30],
tmp[30],
idx;
if(!strcmp(cmd,"/goto", true))
{
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USE: /goto ID");
    new outro = strval(tmp);
    if(outro == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "Player desconhecido");
    new
        Float:X,
        Float:Y,
        Float:Z,
        nome[MAX_PLAYER_NAME]
    ;
    GetPlayerPos(outro, X, Y, Z);
    SetPlayerPos(playerid, X, Y ,Z);
    GetPlayerName(playerid, nome, sizeof(nome));
    format(string, 42," Vocк usou /goto no player %s", nome);
    SendClientMessage(playerid, -1, string);
    return true;
}
Ai й sу aprimorar avontade.
Erro:
pawn Code:
C:\Users\Jefferson\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4548) : error 017: undefined symbol "cmd"
C:\Users\Jefferson\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4548) : warning 215: expression has no effect
C:\Users\Jefferson\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4548) : error 001: expected token: ";", but found "]"
C:\Users\Jefferson\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4548) : error 029: invalid expression, assumed zero
C:\Users\Jefferson\Desktop\SAMP 0.3a Server [De]\gamemodes\De.pwn(4548) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
[AJUDA]Goto e Salvar posiзгo - by .CrazZy._.[De] - 19.09.2011, 02:08
Re: [AJUDA]Goto e Salvar posiзгo - by CyNiC - 19.09.2011, 02:10
Re: [AJUDA]Goto e Salvar posiзгo - by WLSF - 19.09.2011, 02:15
Re: [AJUDA]Goto e Salvar posiзгo - by .CrazZy._.[De] - 19.09.2011, 02:29
Re: [AJUDA]Goto e Salvar posiзгo - by WLSF - 19.09.2011, 02:30
Re: [AJUDA]Goto e Salvar posiзгo - by .CrazZy._.[De] - 19.09.2011, 02:33
Re: [AJUDA]Goto e Salvar posiзгo - by WLSF - 19.09.2011, 02:35
Re: [AJUDA]Goto e Salvar posiзгo - by .CrazZy._.[De] - 19.09.2011, 02:47
Re: [AJUDA]Goto e Salvar posiзгo - by WLSF - 19.09.2011, 02:48
Re: [AJUDA]Goto e Salvar posiзгo - by .CrazZy._.[De] - 19.09.2011, 02:52

Forum Jump:


Users browsing this thread: 1 Guest(s)