if( !strcmp( cmd, "/blindar", true ))
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
if( !PlayerToPoint( 1.1, playerid,1911.1052,-1776.7916,13.0881 ))
{
new
v = GetPlayerVehicleID( playerid )
;
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
TempoAutoReparar = SetTimerEx("AutoReparar", 200, true, "i", playerid);
Ativado[playerid] = 1;
SendClientMessage(playerid, 0xDFDFDFAA, "{B0C4DE}[ - ] Vocк agora estб usando Blindagem!.");
SendClientMessage(playerid, COLOR_ERRO, "[ - ] Avise um Administrador para evitar transtornos!");
return 1;
}
if( pInfo[ playerid ][ Level ] <= 10 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem level o suficiente ! ( Somente level superior a 10 )" );
return 1;
}
if( GetPlayerCash( playerid ) < 20000 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem dinheiro o suficiente ! {FFFFFF}( Preзo {009900}$20.000 {FFFFFF} )" );
return 1;
}
return 1;
}
SetTimer
if( !strcmp( cmd, "/blindar", true ))
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
if( !PlayerToPoint( 1.1, playerid,1911.1052,-1776.7916,13.0881 ))
{
new
v = GetPlayerVehicleID( playerid )
;
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
TempoAutoReparar = SetTimerEx("AutoReparar", 200, true, "i", playerid);
Ativado[playerid] = 1;
SendClientMessage(playerid, 0xDFDFDFAA, "{B0C4DE}[ - ] Vocк agora estб usando Blindagem!.");
SendClientMessage(playerid, COLOR_ERRO, "[ - ] Avise um Administrador para evitar transtornos!");
SetTimer("unblindar", 5000, false); //o 5000 representa o tempo em mili-segundos no caso estб 5 segundos!
return 1;
}
if( pInfo[ playerid ][ Level ] <= 10 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem level o suficiente ! ( Somente level superior a 10 )" );
return 1;
}
if( GetPlayerCash( playerid ) < 20000 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem dinheiro o suficiente ! {FFFFFF}( Preзo {009900}$20.000 {FFFFFF} )" );
return 1;
}
return 1;
}
forward unblindar();
public unblindar()
{
SetVehicleHealth( v, 100 );
//Aqui coloca oque quer que mostre tudo quando tirar a blindagem!
}
sу nгo acredito que criou esse comando e nгo sabia como colocar um tempo.
pawn Код:
|
Eu sabia б vбriavel amigo!
Sу nгo sabia como acrescentar o forward Nгo fale oque nгo saiba! Atй + GC |
Eu sabia б vбriavel amigo!
Sу nгo sabia como acrescentar o forward Nгo fale oque nгo saiba! Atй + GC |
SetTimer ? :O
Creio que o certo para a situaзгo й o SetTimerEx sem o SetTimerEx nгo й possivel adicionar parametros. https://sampwiki.blast.hk/wiki/SetTimerEx |
E o pior й que o cara nгo fala se funfo se n funfo!
e ainda nгo diz nem Obrigado pela ajuda, depois querem reclamar que ninguйm mais ajuda. |