SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese > Lançamentos/Releases

Reply
 
Thread Tools Display Modes
Old 21/05/2010, 03:53 PM   #31
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 546
Default Re: Códigos Úteis

ANTI TAGs

pawn Code:
[url=http://forum.sa-mp.com/index.php?topic=154269.0]http://forum.sa-mp.com/index.php?topic=154269.0[/url]
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, Nickname[playerid], MAX_PLAYER_NAME);
if(strfind(Nickname[playerid], "[", true) != -1 || strfind(Nickname[playerid], "]", true) != -1)
{
SendClientMessage(playerid, COR_GAY, "Seu Nick não deve conter Conchetes");
return Kick(playerid);
}

SALVADOR DE IP (não testei)
Em OnPlayerConnect:
pawn Code:
new string[128];
new File:ftw=fopen("admins.txt", io_append);
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, 30, "IPs: %s = %d \r\n", name,plrIP);
fwrite(ftw, string);
fclose(ftw);
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 22/05/2010, 06:31 PM   #32
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 546
Default Re: Códigos Úteis

hum, o que me levou o mudar?


P.S: estava falando do salvador de IPs


DESBUGAR JOGADOR

pawn Code:
if(strcmp(cmd, "/desbug", true) == 0)
{
if(IsPlayerConnected(playerid))//VERIFICA SE ESTA CONECTADO
{
new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000;
GetPlayerPos(playerid, Px, Py, Pz);//PEGA POS
GetPlayerFacingAngle(playerid, Pa);//PEGA ANGULO
RemovePlayerFromVehicle(playerid);//REMOVE VEICULO SE ESTIVE
SetPlayerPos(playerid, Px, Py, (Pz+3), Pa, -1);//JOGA PLAYER AO ALTO PARA DESBUGAR (NAO MATA)
TogglePlayerControllable(playerid,1);//SE TIVE CONGELADO DESONGLEA
}
return 1;
 }
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 22/05/2010, 11:00 PM   #33
zSuYaNw
Godfather
 
zSuYaNw's Avatar
 
Join Date: Apr 2010
Location: Santa Catarina
Posts: 6,840
Reputation: 672
Default Re: Códigos Úteis

Gosta de se esconder :P


pawn Code:
if (strcmp(cmdtext,"/esconder", true)==0)
    {
    SetPlayerInterior(playerid,0);
    GameTextForPlayer(playerid,"~g~Voce esta no esconder!", 3000, 5);
    SetPlayerPos(playerid, 2087.724,1781.213,76.106);
    return 1;
    }

Créditos: LvB,

Last edited by zSuYaNw; 04/05/2013 at 07:59 PM.
zSuYaNw is offline   Reply With Quote
Old 23/05/2010, 05:35 AM   #34
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 546
Default Re: Códigos Úteis

PUNHETA
pawn Code:
if (strcmp(cmdtext, "/punheta", true)==0){
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
SendClientMessage(playerid,COR, " Parabéns Você esta batendo punheta");
return 1;
}

Créditos ao GM: Small Drfit
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 24/05/2010, 04:39 PM   #35
blackinhu214
Big Clucker
 
Join Date: May 2010
Posts: 111
Reputation: 1
Default Re: Códigos Úteis

Limpar chat
no public onplayercommand
pawn Code:
if(strcmp(cmdtext,"/limparchat", true) == 0)
{
    if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1337)
   for(new a = 0; a < 100; a++)
   {
      SendClientMessageToAll(0xFFFFFFFF, " ");
   }

   return 1;
}

no onplayertext
pawn Code:
if(strfind(text, "189.", true) != -1 || strfind(text, "201.", true) != -1 || strfind(text, "200.", true) != -1 || strfind(text, "69.", true) != -1 || strfind(text, "187.", true) != -1){
    SendClientMessage(playerid,COLOR_LIGHTRED,"Desculpe mais aki nao tem divulgaçao xD! ;)");
    format(string, sizeof(string), "~%s levou kick automático. Motivo: Aki ninguem divulga!" ,PlayerNamex(playerid));
  SendClientMessageToAll(COLOR_LIGHTRED, string);
    Kick(playerid);
    return 0;

blackinhu214 is offline   Reply With Quote
Old 24/05/2010, 05:10 PM   #36
SuB_ZeRo0_
Gangsta
 
SuB_ZeRo0_'s Avatar
 
Join Date: Aug 2009
Posts: 870
Reputation: 23
Default Re: Códigos Úteis

Quote:
Originally Posted by blackinhu214
Limpar chat
no public onplayercommand
pawn Code:
if(strcmp(cmdtext,"/limparchat", true) == 0)
{
    if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1337)
   for(new a = 0; a < 100; a++)
   {
      SendClientMessageToAll(0xFFFFFFFF," ");
   }

   return 1;
}
Esse limpar chat tá melhor: xD
pawn Code:
if(strcmp(cmdtext,"/limparchat", true) == 0)
{
   if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFFFFFFFF,"Você não é um admin RCON!");
   else {
   for(new i=0;i<GetMaxPlayers();i++) {
   for(new a = 0; a < 100; a++) {
     if(!IsPlayerAdmin(i)) {
        SendClientMessage(i,0xFFFFFFFF, " ");
     }}
   SendClientMessage(i,0xFFFFFFFF,"Chat Limpo!");
   }}
   return 1;
}

Deve ser assim +/-.
__________________
SuB_ZeRo0_ is offline   Reply With Quote
Old 25/05/2010, 12:31 AM   #37
zSuYaNw
Godfather
 
zSuYaNw's Avatar
 
Join Date: Apr 2010
Location: Santa Catarina
Posts: 6,840
Reputation: 672
Default Re: Códigos Úteis

Morte Suprema

pawn Code:
if (strcmp("/mortesuprema", cmdtext, true, 10) == 0)
    {
    SetPlayerHealth(playerid, -999999);
        SendClientMessage(playerid, COLOR_WHITE, "Morreu.kkkkkkkkkkkkkkkkkkkkkk'");
    return 1;
    }

Trancar e destrancar

pawn Code:
//=================================[ TRANCAR & DESTRANCAR ]
new vehicleid = GetPlayerVehicleID(playerid);
if (strcmp(cmdtext, "/trancar", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Stat5 ;
Stat5=GetPlayerState(playerid);
if(Stat5!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"Voce não pode trancar esse veículo!");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
 SetVehicleParamsForPlayer(vehicleid,i, 0, 1);
   }
}
SendClientMessage(playerid, COLOR_GREEN, "VEICULO TRANCADO.");
}
else
{
SendClientMessage(playerid, COLOR_RED,"Voce não está em um veículo!");
}
return 1;
}
    if (strcmp(cmdtext, "/destrancar", true)==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Stat6 ;
Stat6 = GetPlayerState(playerid);
if(Stat6!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,COLOR_RED,"Voce não pode destrancar esse veículo!");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(vehicleid,i, 0, 0);
}
SendClientMessage(playerid, COLOR_WHITE, "VEICULO DESTRANCADO.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Voce não está em um veículo!");
}
return 1;
}

Créditos: Lvb

Last edited by zSuYaNw; 04/05/2013 at 08:00 PM.
zSuYaNw is offline   Reply With Quote
Old 26/05/2010, 08:22 PM   #38
Rick_DR
Huge Clucker
 
Rick_DR's Avatar
 
Join Date: Mar 2010
Posts: 403
Reputation: 9
Default Re: Códigos Úteis

Comando para mandar uma mensagem com o vosso nome mais acção.


pawn Code:
if(!strcmp(cmdtext, "/eu", true, 3)) //
  {
if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USA: /eu [texto]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "%s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}

**Retirado da WIKI apenas traduzi, acho que da jeito
__________________
Hostname: [PB] Patos-Tugas V2 Host 24 H
Rick_DR is offline   Reply With Quote
Old 26/05/2010, 10:04 PM   #39
zSuYaNw
Godfather
 
zSuYaNw's Avatar
 
Join Date: Apr 2010
Location: Santa Catarina
Posts: 6,840
Reputation: 672
Default Re: Códigos Úteis

Criando Carro xD

Aonde Esta De vermelho é o ID do Veiculo, no Caso 562= Elegy.
Logo Abaixo Esta com [*pawn] [*/pawn]


if(!strcmp(cmdtext, "/elegy", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
return SendClientMessage(playerid, 0x33AA33AA, "Voce ja esta em um veiculo");
}
new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
GetPlayerPos(playerid, var0, var1, var2);
GetPlayerFacingAngle(playerid, var3);
CreateVehicle(562, var0 + 1, var1 + 1, var2, var3, 1, 1, 10000);
return 1;
}
pawn Code:
if(!strcmp(cmdtext, "/elegy", true))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            return SendClientMessage(playerid, 0x33AA33AA, "Voce ja esta em um veiculo");
        }
        new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
        GetPlayerPos(playerid, var0, var1, var2);
        GetPlayerFacingAngle(playerid, var3);
        CreateVehicle(562, var0 + 1, var1 + 1, var2, var3, 1, 1, 10000);
        return 1;
    }

Last edited by zSuYaNw; 04/05/2013 at 08:01 PM.
zSuYaNw is offline   Reply With Quote
Old 27/05/2010, 10:29 AM   #40
Ricardo_Saddler
Big Clucker
 
Ricardo_Saddler's Avatar
 
Join Date: Jan 2010
Posts: 179
Reputation: 1
Default Re: Códigos Úteis

Criando Carro (Diferente)

Me basiei no de cima, e fiz um que te coloca no veiculo já.

pawn Code:
if(!strcmp(cmdtext, "/elegy", true))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            return SendClientMessage(playerid, 0x33AA33AA, "Voce ja esta em um veiculo");
        }
        new Float:var0 = 0, Float:var1 = 0, Float:var2 = 0, Float:var3 = 0;
        GetPlayerPos(playerid, var0, var1, var2);
        GetPlayerFacingAngle(playerid, var3);
        elegy = CreateVehicle(562, var0 + 1, var1 + 1, var2, var3, 1, 1, 10000); /*Define este carro como "elegy"*/
        PutPlayerInVehicle(playerid, elegy); /*Bota o cara que digitou o cmd no carro "elegy".*/
        return 1;
    }
__________________
Oi :B
Ricardo_Saddler is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Menus Úteis [SKIN|CARROS|ARMAS] SlashPT Lançamentos/Releases 25 02/05/2014 03:56 PM
[Include] [INC]Várias e Uteis Funções andmeida10 Lançamentos/Releases 28 14/12/2012 01:49 PM
[PEDIDO] Codigos Hashtag Português/Portuguese 7 16/11/2011 10:09 PM


All times are GMT. The time now is 10:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.