if( !strcmp( cmd, "/localizar", true ))
{
format( gFile, sizeof( gFile ), "Contas/%s.ini", PlayerName( playerid ));
if( dini_Int( gFile, "GPSPlayer" ) == 1 || aInfo[ playerid ][ Dono ] == 1 || aInfo[ playerid ][ Admin ] == 1 )
{
tmp = strtok( cmdtext, idx );
if( !strlen( tmp ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Uso correto: /Localizar [ ID/OFF ]" );
return 1;
}
if( !strcmp( tmp, "off", true ))
{
if( GPS[ playerid ] )
{
KillTimer( T_GPS[ playerid ] );
GPS[ playerid ] = false;
T_GPS[ playerid ] = 0;
DisablePlayerCheckpoint( playerid );
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] O GPSPlayer foi desabilitado." );
}
else SendClientMessage( playerid, COLOR_ERRO, "[ x ] O GPSPlayer nгo estб ligado !" );
return 1;
}
if( IsPlayerConnected( strval( tmp )) )
{
if( aInfo[ strval( tmp ) ][ Dono ] == 0 || aInfo[ strval( tmp ) ][ Admin ] == 0 || aInfo[ strval( tmp ) ][ Moderador ] == 0 )
{
if( strval( tmp ) != playerid )
{
if( GPS[ playerid ] )
{
KillTimer( T_GPS[ playerid ] );
GPS[ playerid ] = false;
T_GPS[ playerid ] = 0;
}
T_GPS[ playerid ] = SetTimerEx( "AtualizaGPS", 500, true, "dd", playerid, strval( tmp ));
GPS[ playerid ] = true;
new
nick[ 24 ]
;
GetPlayerName( strval( tmp ), nick, 24 );
format( str, 128, "[ > ] Vocк estб localizando: %s ( ID: %d )", nick, strval( tmp ));
SendClientMessage( playerid, COLOR_AMARELO, str );
}
else SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode localizar vocк mesmo !" );
}
else SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode localizar membros da STAFF !" );
}
else SendClientMessage( playerid, COLOR_ERRO, "[ x ] Ninguйm online com esse ID !" );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo tem um GPSPlayer !" );
}
return 1;
}
if( !strcmp( cmd, "/participar", true ))
{
if( EventoCriado == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Nгo existe nenhum evento criado no momento !" );
return 1;
}
if( PlayerWantedLevel ( playerid ) == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" );
return 1;
}
if( ParticipandoEvento[ playerid ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк jб estб participando do evento !" );
return 1;
}
if( vOcupados == VeiculosEvento )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Jб excedeu o limite de players no evento !" );
return 1;
}
if( !strcmp( cmdtext, "/consertar", true ))
{
if( pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Dono ] == 1 || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Moderador ] == 1 )
{
if( !IsPlayerInAnyVehicle( playerid ))
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" );
return 1;
}
SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" );
new
v = GetPlayerVehicleID( playerid )
;
SetVehicleHealth( v, 1000 );
RepairVehicle( v );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 );
}
else
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" );
}
return 1;
}
if( !strcmp( cmd, "/participar", true ))
{
if( EventoCriado == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Nгo existe nenhum evento criado no momento !" );
return 1;
}
if( ParticipandoEvento[ playerid ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк jб estб participando do evento !" );
return 1;
}
if( vOcupados == VeiculosEvento )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Jб excedeu o limite de players no evento !" );
return 1;
}
new TempoComando[100];
OnPlayerConnect : TempoComando[playerid] = 0;
OnPlayerDeath : TempoComando[playerid] = 0;
//E no seu comando coloque :
if(gettime() - TempoComando[playerid] < 300) return SendClientMessage(playerid, -1, "Vocк tem que esperar um pouco para usar o comando novamente :)");
TempoComando[playerid] = gettime();
if( aInfo[ strval( tmp ) ][ Dono ] == 0 || aInfo[ strval( tmp ) ][ Admin ] == 0 || aInfo[ strval( tmp ) ][ Moderador ] == 0 )
if( PlayerWantedLevel ( playerid ) == 1 ) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" ); return 1; }
if( !strcmp( cmdtext, "/consertar", true )) { if( pInfo[ playerid ][ Prof ] == MECANICO || aInfo[ playerid ][ Dono ] == 1 || aInfo[ playerid ][ Admin ] == 1 || aInfo[ playerid ][ Moderador ] == 1 ) { if( !IsPlayerInAnyVehicle( playerid )) { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo estб em um veнculo !" ); return 1; } SendClientMessage( playerid, COLOR_AMARELO, "[ > ] Veнculo consertado !" ); new v = GetPlayerVehicleID( playerid ); SetVehicleHealth( v, 1000 ); RepairVehicle( v ); PlayerPlaySound( playerid, 1057, 0.0, 0.0, 10.0 ); } else { SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo й um(a) Mecвnico(a) !" ); } return 1; }
O player quando estive com estrela de procurado, nгo poder participar de evento
|
if( PlayerWantedLevel ( playerid ) == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" );
return 1;
}
O do GPS eu nгo entendi.
O segundo vocк usa GetPlayerWantedLevel. O terceiro й que estб faltando fecha a chave do else. Cara, aprende pawn que tudo fica mais fбcil. Tudo que acontece nesse seu GameMode vocк pede ajuda aqui sem ao menos tentar. Erros bestas que sу por causa de uma chave sгo solucionados, deveria ter mais consciкncia. Abraзos, |
if( !strcmp( cmd, "/participar", true ))
{
if( EventoCriado == 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Nгo existe nenhum evento criado no momento !" );
return 1;
}
if( PlayerWantedLevel ( playerid ) == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" );
return 1;
}
if( ParticipandoEvento[ playerid ] == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк jб estб participando do evento !" );
return 1;
}
if( vOcupados == VeiculosEvento )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Jб excedeu o limite de players no evento !" );
return 1;
}
if( PlayerWantedLevel ( playerid ) == 1 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" );
return 1;
}
if( PlayerWantedLevel ( playerid ) > 0 )
{
SendClientMessage( playerid, COLOR_ERRO, "[ x ] Vocк nгo pode participar do evento estando procurado !" );
return 1;
}
Bom galera, o primeiro eu tambйm nгo sei porque do erro, o cуdigo estб certo... :/
|