04.05.2011, 20:06
Arruma Aquela Cйlula.
#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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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 );
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;
}