[Ajuda] 2 Comandos
#7

Desculpe pelos erros, digitei rбpido e dei CTRL + C e CTRL + V no cуdigo.
Tente este!

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("         @@Sistemas de Relogio@@        ");
    print(" Criado por: Jorge_Hard - [JFS]Jonathan ");
    print("         NAO RETIRE OS CREDITOS         ");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n--------------------------------------");
    print("         @@Sistemas de Relogio@@        ");
    print(" Criado por: Jorge_Hard - [JFS]Jonathan ");
    print("         NAO RETIRE OS CREDITOS         ");
    print("--------------------------------------\n");
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd,"/relogio",true)==0)
{
    new relogio[ 128];
    (relogio) = strtok( cmdtext, idx);
    if( !strlen(relogio) )
    {
        SendClientMessage( playerid, 0xFFF000AA, "Use: /relogio [1 - 15]");
        return true;
    }
    if( strcmp(relogio,"1", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19039, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "2", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19040, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "3", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19041, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "4", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19042, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "5", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19043, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "6", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19044, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "7", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19045, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "8", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19046, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "9", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19047, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "10", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19048, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "11", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19049, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "12", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19050, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "13", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19051, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "14", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19052, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    if( strcmp(relogio, "15", true ) == 0 )
    {
        SetPlayerAttachedObject( playerid, 0, 19053, 5, 0.000000, -0.007722, -0.011143, 9.279358, 270.517852, 190.637268, 1.000000, 1.000000, 1.000000 );
        GivePlayerMoney(playerid -180);
        return true;
    }
    return 1;
}
    return 0;
}
stock 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


Messages In This Thread
[Ajuda] 2 Comandos - by Felipe_Wesker - 03.05.2011, 22:47
Re: [DUV]2 Comandos - by Josma_cmd - 03.05.2011, 22:51
Re: [DUV]2 Comandos - by Macintosh - 03.05.2011, 23:04
Re: [Ajuda] 2 Comandos - by Felipe_Wesker - 04.05.2011, 18:48
Re: [Ajuda] 2 Comandos - by Shadoww5 - 04.05.2011, 18:56
Re: [Ajuda] 2 Comandos - by JonathanFeitosa - 04.05.2011, 18:57
Re: [Ajuda] 2 Comandos - by Macintosh - 04.05.2011, 19:13
Re: [Ajuda] 2 Comandos - by Felipe_Wesker - 05.05.2011, 15:50

Forum Jump:


Users browsing this thread: 1 Guest(s)