Cуdigos Ъteis #1

Numero Random


ZCMD:
pawn Code:
CMD:numero(playerid,params[])
{
    new Str[128];
    format(Str,sizeof(Str),"o numero й %d",random(50));
    SendClientMessage(playerid,-1,Str);
    return true;
}
STRCMP:
pawn Code:
if(!strcmp("/numero",cmdtext,true))
{
        new Str[128];
    format(Str,sizeof(Str),"o numero й %d",random(50));
    SendClientMessage(playerid,-1,Str);
    return 1;  
}
PRINT:
pawn Code:
public OnGameModeInit()
{
        printf("o numero й %d",random(50));
}
Reply

pawn Code:
stock eumesmo(playerid)
{
    new
        nome[MAX_PLAYER_NAME]
    ;

    GetPlayerName(playerid,nome,sizeof(nome));
    if(strcmp(nome,"Willian_Luigi", true) == 0)
    {
        return 1;
    }
    return 0;
}
Modo de USO:
pawn Code:
//exemplo de comando
if(!strcmp(cmd,"/kick", true))
{
    if(eumesmo(playerid))
    {
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, -1, "USE: /kick [id]");
        }
        new outro = strval(tmp);
        if(outro == INVALID_PLAYER_ID)
        {
            SendClientMessage(playerid, -1, "PLAYER DESCONHECIDO.");
        }
        Kick(outro);
   }
   return 1;
}
Ele verifica o meu nome antes de efetuar o tal comando, se nгo for eu, ele nгo diz nada, se for eu ele kika o player escolhido por mim.
Reply

Player mais Rico do Servidor:
pawn Code:
new Recorde;
new ID;
new Texto[128];

for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(!IsPlayerConnect(i)) continue;
    if(GetPlayerMoney(i) > Recorde) Recorde = GetPlayerMoney(i),ID = i;
}
format(Texto,120,"O Player Mais Rico do Servidor й o %s com $%d",GetPlayerNameEx(ID),Recorde);
SendClientMessageToAll(0x008000AA,Texto);

stock GetPlayerNameEx(playerid)
{
    new Nome[24];
    GetPlayerName(playerid,Nome,MAX_PLAYER_NAME];
    return Nome;
}
Reply

pawn Code:
bool:IsARolePlayName ( const name [ ] )
{
    new length = strlen ( name ),
        last_underline = - 1;

    if ( name [ length - 1 ] == 0x5F )
        return false;
       
    while ( length -- )
    {
        if ( name [ length ] == 0x5F )
        {
            if ( last_underline == length + 1 )
                return false;
           
            last_underline = length;
            continue;
        }

        if ( !( 0x40 < name [ length ] < 0x5B || 0x60 < name [ length ] < 0x7B ) )
        {
            return false;
        }
    }

    return last_underline > 0;
}
Reply

Inicio do GM
pawn Code:
new NicksProibidos[][MAX_PLAYER_NAME]  ={
"[ViP","[MT Lavis","[XXX Whatever","com1","com2","com3","com4","com5","com6",
"com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9",
"Sou_Hacker","SouHacker","Xiter","clock$","prn","nul","con","Pepe","Arnoldo","Coca_Cola","Pepsi",
"Azucar","Troll_face","CON","con","con1","Zoquete","Pacman","Batman","AquilesBrinco","ServerLixo","Papirola",
"Sou_","aux","con@lpt","oi","aux1","prn","Joao_Pereira","[BTG]","PRN","AUX","Boquete"
};
OnPlayerConnect
pawn Code:
new viadinho[256];
GetPlayerName(playerid,viadinho,256);
for(new i; i<sizeof(NicksProibidos); i++)
{
if(strcmp(NicksProibidos[i],viadinho,true)==0)
{
SendClientMessage(playerid,0xFFFF00AA,"SAI DAQUI SEU NB INVEJOSO! RIARIARIA!");
Ban(playerid);
}
}

Criando Interiores
pawn Code:
if(strcmp(cmdtext,"/criarinterior", true) == 0) {
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
for(new i = 0; p < MAX_CASAS; i++)
{
format(string, sizeof(string),"/Interiores/int%d.ini", i);
if(!dini_Exists(string)){
if(IsPlayerAdmin(playerid)){
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
dini_Create(string);
dini_IntSet(string,"Int", GetPlayerInterior(playerid));
dini_FloatSet(string,"EX", X);
dini_FloatSet(string,"EY", Y);
dini_FloatSet(string,"EZ", Z);
new string2[256];
format(string2, sizeof(string2),"[INTERIOR] Vocк criou o interior '%d'.",i);
SendClientMessage(playerid,0xFFFFFFAA,string2);
return 1;
} else {
}
}
}
return 1;
}
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
if(strcmp(cmd,"/cantar",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new tmp[256];
new msg[256];
strmid(tmp,cmdtext,6,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000AA,"/cantar [texto]");
return 1;
} else {
format(msg,sizeof(msg),"(~) O Cantor %s canta:%s",aname,tmp);
SendClientMessageToAll(0x8AD9FFAA,msg);
return 1;
}
}else{
SendClientMessage(playerid,Vermelho,"{0099FF}(~){CCCCFF} Vocк nгo tem permissгo!");
return 1;
}
}
return 0;
}
Reply

----
Reply

Remover todas as maquinas de SPUNK ou Maquinas de Refrigerante.
Acho q ta todas mesmo, esquece de alguma ? avise . . .
Muito util em servidores RPG e RP ! ! !
Eu ADD algumas maquinas mais tem base nesse poste os cretidos estao no link.
https://sampforum.blast.hk/showthread.php?tid=203675&page=2
Para versao do SAMP 0.3D.
PHP Code:
    RemoveBuildingForPlayer(playerid1226778.8594, -1391.156316.31250.25);
    
RemoveBuildingForPlayer(playerid1307937.9375, -986.539137.03130.25);
    
RemoveBuildingForPlayer(playerid9551154.7266, -1460.890615.15630.25);
    
RemoveBuildingForPlayer(playerid9562480.86,-1959.27,12.96090.25);
    
RemoveBuildingForPlayer(playerid9561634.11,-2237.53,12.89060.25);
    
RemoveBuildingForPlayer(playerid9562139.52,-1161.48,23.35940.25);
    
RemoveBuildingForPlayer(playerid9562153.23,-1016.15,62.23440.25);
    
RemoveBuildingForPlayer(playerid955, -1350.12,493.859,10.58595.0);
    
RemoveBuildingForPlayer(playerid956, -1350.12,493.859,10.58595.0);
    
RemoveBuildingForPlayer(playerid956, -2229.19,286.414,34.70310.25);
    
RemoveBuildingForPlayer(playerid9561659.46,1722.86,10.21880.25);
    
RemoveBuildingForPlayer(playerid9562647.7,1129.66,10.21880.25);
    
RemoveBuildingForPlayer(playerid9562845.73,1295.05,10.78910.25);
    
RemoveBuildingForPlayer(playerid9561398.84,2222.61,10.42190.25);
    
RemoveBuildingForPlayer(playerid956, -1455.12,2591.66,55.23440.25);
    
RemoveBuildingForPlayer(playerid956, -76.0312,1227.99,19.1250.25);
    
RemoveBuildingForPlayer(playerid956662.43,-552.164,15.71090.25);
    
RemoveBuildingForPlayer(playerid955, -253.742,2599.76,62.24225.0);
    
RemoveBuildingForPlayer(playerid956, -253.742,2599.76,62.24225.0);
    
RemoveBuildingForPlayer(playerid9562271.73,-76.4609,25.96090.25);
    
RemoveBuildingForPlayer(playerid9551789.21,-1369.27,15.16410.25);
    
RemoveBuildingForPlayer(playerid9551729.79,-1943.05,12.94530.25);
    
RemoveBuildingForPlayer(playerid9552060.12,-1897.64,12.92970.25);
    
RemoveBuildingForPlayer(playerid9551928.73,-1772.45,12.94530.25);
    
RemoveBuildingForPlayer(playerid9552325.98,-1645.13,14.21090.25);
    
RemoveBuildingForPlayer(playerid9552352.18,-1357.16,23.77340.25);
    
RemoveBuildingForPlayer(playerid955, -2118.97,-423.648,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2118.62,-422.414,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2097.27,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2092.09,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2063.27,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2005.65,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2034.46,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2068.56,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2039.85,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2011.14,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -1980.79,142.664,27.07030.25);
    
RemoveBuildingForPlayer(playerid9552319.99,2532.85,10.21880.25);
    
RemoveBuildingForPlayer(playerid9551520.15,1055.27,10.000.25);
    
RemoveBuildingForPlayer(playerid9552503.14,1243.7,10.21880.25);
    
RemoveBuildingForPlayer(playerid9552085.77,2071.36,10.45310.25);
    
RemoveBuildingForPlayer(playerid955, -862.828,1536.61,21.98440.25);
    
RemoveBuildingForPlayer(playerid955, -14.7031,1175.36,18.95310.25);
    
RemoveBuildingForPlayer(playerid956, -253.742,2597.95,62.24225.0);
    
RemoveBuildingForPlayer(playerid955, -253.742,2597.95,62.24225.0);
    
RemoveBuildingForPlayer(playerid955201.016,-107.617,0.8984380.25);
    
RemoveBuildingForPlayer(playerid9551277.84,372.516,18.95310.25);
    
RemoveBuildingForPlayer(playerid1775, -19.0391, -57.83591003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -36.1484, -57.87501003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -16.1172, -91.64061003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -17.5469, -91.71091003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -16.5313, -140.29691003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -15.1016, -140.22661003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -33.8750, -186.76561003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -32.4453, -186.69531003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -35.7266, -140.22661003.63280.25);
    
RemoveBuildingForPlayer(playerid1977316.8750, -140.3516998.58590.25);
    
RemoveBuildingForPlayer(playerid17762202.45311617.00781000.06250.25);
    
RemoveBuildingForPlayer(playerid17762209.24221621.21091000.06250.25);
    
RemoveBuildingForPlayer(playerid17762222.36721602.64061000.06250.25);
    
RemoveBuildingForPlayer(playerid17752222.20311606.77341000.05470.25);
    
RemoveBuildingForPlayer(playerid1775495.9688, -24.32031000.73440.25);
    
RemoveBuildingForPlayer(playerid1776500.5625, -1.36721000.73440.25);
    
RemoveBuildingForPlayer(playerid1775501.8281, -1.42971000.73440.25); 
Reply

@[LF]PlaYer

Rapaz comece a identar seus Cods...
Reply

Quote:
Originally Posted by |_MeGaTroN_|
View Post
@[LF]PlaYer

Rapaz comece a identar seus Cods...
№- Eu nao mecho + com pawn ( as vezes )
І- Preguiзa onwa
і- .___________________.
Reply

Quote:
Originally Posted by lucas_mdr1235
View Post
Remover todas as maquinas de SPUNK ou Maquinas de Refrigerante.
Acho q ta todas mesmo, esquece de alguma ? avise . . .
Muito util em servidores RPG e RP ! ! !
Eu ADD algumas maquinas mais tem base nesse poste os cretidos estao no link.
https://sampforum.blast.hk/showthread.php?tid=203675&page=2
Para versao do SAMP 0.3D.
PHP Code:
    RemoveBuildingForPlayer(playerid1226778.8594, -1391.156316.31250.25);
    
RemoveBuildingForPlayer(playerid1307937.9375, -986.539137.03130.25);
    
RemoveBuildingForPlayer(playerid9551154.7266, -1460.890615.15630.25);
    
RemoveBuildingForPlayer(playerid9562480.86,-1959.27,12.96090.25);
    
RemoveBuildingForPlayer(playerid9561634.11,-2237.53,12.89060.25);
    
RemoveBuildingForPlayer(playerid9562139.52,-1161.48,23.35940.25);
    
RemoveBuildingForPlayer(playerid9562153.23,-1016.15,62.23440.25);
    
RemoveBuildingForPlayer(playerid955, -1350.12,493.859,10.58595.0);
    
RemoveBuildingForPlayer(playerid956, -1350.12,493.859,10.58595.0);
    
RemoveBuildingForPlayer(playerid956, -2229.19,286.414,34.70310.25);
    
RemoveBuildingForPlayer(playerid9561659.46,1722.86,10.21880.25);
    
RemoveBuildingForPlayer(playerid9562647.7,1129.66,10.21880.25);
    
RemoveBuildingForPlayer(playerid9562845.73,1295.05,10.78910.25);
    
RemoveBuildingForPlayer(playerid9561398.84,2222.61,10.42190.25);
    
RemoveBuildingForPlayer(playerid956, -1455.12,2591.66,55.23440.25);
    
RemoveBuildingForPlayer(playerid956, -76.0312,1227.99,19.1250.25);
    
RemoveBuildingForPlayer(playerid956662.43,-552.164,15.71090.25);
    
RemoveBuildingForPlayer(playerid955, -253.742,2599.76,62.24225.0);
    
RemoveBuildingForPlayer(playerid956, -253.742,2599.76,62.24225.0);
    
RemoveBuildingForPlayer(playerid9562271.73,-76.4609,25.96090.25);
    
RemoveBuildingForPlayer(playerid9551789.21,-1369.27,15.16410.25);
    
RemoveBuildingForPlayer(playerid9551729.79,-1943.05,12.94530.25);
    
RemoveBuildingForPlayer(playerid9552060.12,-1897.64,12.92970.25);
    
RemoveBuildingForPlayer(playerid9551928.73,-1772.45,12.94530.25);
    
RemoveBuildingForPlayer(playerid9552325.98,-1645.13,14.21090.25);
    
RemoveBuildingForPlayer(playerid9552352.18,-1357.16,23.77340.25);
    
RemoveBuildingForPlayer(playerid955, -2118.97,-423.648,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2118.62,-422.414,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2097.27,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2092.09,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2063.27,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2005.65,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2034.46,-490.055,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2068.56,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2039.85,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -2011.14,-398.336,34.72660.25);
    
RemoveBuildingForPlayer(playerid955, -1980.79,142.664,27.07030.25);
    
RemoveBuildingForPlayer(playerid9552319.99,2532.85,10.21880.25);
    
RemoveBuildingForPlayer(playerid9551520.15,1055.27,10.000.25);
    
RemoveBuildingForPlayer(playerid9552503.14,1243.7,10.21880.25);
    
RemoveBuildingForPlayer(playerid9552085.77,2071.36,10.45310.25);
    
RemoveBuildingForPlayer(playerid955, -862.828,1536.61,21.98440.25);
    
RemoveBuildingForPlayer(playerid955, -14.7031,1175.36,18.95310.25);
    
RemoveBuildingForPlayer(playerid956, -253.742,2597.95,62.24225.0);
    
RemoveBuildingForPlayer(playerid955, -253.742,2597.95,62.24225.0);
    
RemoveBuildingForPlayer(playerid955201.016,-107.617,0.8984380.25);
    
RemoveBuildingForPlayer(playerid9551277.84,372.516,18.95310.25);
    
RemoveBuildingForPlayer(playerid1775, -19.0391, -57.83591003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -36.1484, -57.87501003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -16.1172, -91.64061003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -17.5469, -91.71091003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -16.5313, -140.29691003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -15.1016, -140.22661003.63280.25);
    
RemoveBuildingForPlayer(playerid1776, -33.8750, -186.76561003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -32.4453, -186.69531003.63280.25);
    
RemoveBuildingForPlayer(playerid1775, -35.7266, -140.22661003.63280.25);
    
RemoveBuildingForPlayer(playerid1977316.8750, -140.3516998.58590.25);
    
RemoveBuildingForPlayer(playerid17762202.45311617.00781000.06250.25);
    
RemoveBuildingForPlayer(playerid17762209.24221621.21091000.06250.25);
    
RemoveBuildingForPlayer(playerid17762222.36721602.64061000.06250.25);
    
RemoveBuildingForPlayer(playerid17752222.20311606.77341000.05470.25);
    
RemoveBuildingForPlayer(playerid1775495.9688, -24.32031000.73440.25);
    
RemoveBuildingForPlayer(playerid1776500.5625, -1.36721000.73440.25);
    
RemoveBuildingForPlayer(playerid1775501.8281, -1.42971000.73440.25); 
pawn Code:
RemoveBuildingForPlayer(playerid, 1226, 778.8594, -1391.1563, 16.3125, 50000.0);
    RemoveBuildingForPlayer(playerid, 1307, 937.9375, -986.5391, 37.0313, 50000.0);
    RemoveBuildingForPlayer(playerid, 955, 1154.7266, -1460.8906, 15.1563,50000.0);
    RemoveBuildingForPlayer(playerid, 956, 2480.86,-1959.27,12.9609, 50000.0);
    RemoveBuildingForPlayer(playerid, 955, -1350.12,493.859,10.5859, 50000.0);
    RemoveBuildingForPlayer(playerid, 1775, -19.0391, -57.8359, 1003.6328, 50000.0);
    RemoveBuildingForPlayer(playerid, 1776, -36.1484, -57.8750, 1003.6328, 50000.0);
    RemoveBuildingForPlayer(playerid, 1977, 316.8750, -140.3516, 998.5859, 50000.0);
Gente burra й foda.
Reply

Quote:
Originally Posted by Shadoww5
View Post
OnPlayerVWChange

Funзгo: Detecta troca de VirtualWorld de um jogador
PHP Code:
new OldVW[MAX_PLAYERS];
new 
NewVW[MAX_PLAYERS];
#define SetPlayerVirtualWorld S_SetPlayerVirtualWorld
stock S_SetPlayerVirtualWorld(playeridworldid)
{
    if(!
IsPlayerConnected(playerid)) return 1;
    
OldVW[playerid] = GetPlayerVirtualWorld(playerid);
    
NewVW[playerid] = worldid;
    
SetPlayerVirtualWorld(playeridworldid);
    return 
CallLocalFunction("OnPlayerVWChange""iii"playeridNewVW[playerid], OldVW[playerid]);
}
forward OnPlayerVWChange(playeridnewvwoldvw); 
Nгo vai funcionar porque vocк tб chamando a prуpria funзгo na funзгo. tsk tsk.
Reply

pawn Code:
Strong_SetPlayerVirtualWorld ( playerid, id ) {

    if ( IsPlayerConnected ( playerid ) ) {
   
        new vw = GetPlayerVirtualWorld ( playerid );
       
        SetPlayerVirtualWorld ( playerid, id );
        CallRemoteFunction ( "OnPlayerVirtualWorldChange", "iii", playerid, id, vw );
    }
}

forward OnPlayerVirtualWorldChange(playerid, newworld, oldworld);

#define SetPlayerVirtualWorld Strong_SetPlayerVirtualWorld
Este funciona ^^.
Reply

Converter Cor HTML para PAWN

Fiz esta funзгo quando estava criando sistema de gang para um amigo meu.
ele й bem simples.
pawn Код:
static stock ConvertHtmlColorToPawn(color[])
{
    static s[20];
    format(s, strlen(color),"0x%sFF", color);
    return strval(s);
}
USO:
pawn Код:
SendClientMessage(playerid,  ConvertHtmlColorToPawn("000099"), "Olб, Esta mensagem й azul");
Reply

Gorro de natal:

pawn Код:
new bool:UsandoGorro[MAX_PLAYERS];

stock DarGorro(playerid)
{
    SetPlayerAttachedObject(playerid, 1, 19065, 15, -0.025, -0.04, 0.23, 0, 0, 270, 2, 2, 2);
    return 1;
}

stock RemoverGorro(playerid)
{
    RemovePlayerAttachedObject(playerid, 1);
    return 1;
}

CMD:usargorro(playerid)
{
    if(UsandoGorro[playerid]) return SendClientMessage(playerid, -1, "[ Erro ] Vocк jб estб usando o gorro!");
    SendClientMessage(playerid, -1, "Agora vocк estб usando o gorro!");
    DarGorro(playerid);
    UsandoGorro[playerid] = true;
    return 1;
}

CMD:tirargorro(playerid)
{
    if(!UsandoGorro[playerid]) return SendClientMessage(playerid, -1, "[ Erro ] Vocк nгo estб usando o gorro!");
    SendClientMessage(playerid, -1, "Agora vocк nгo estб mais usando o gorro!");
    RemoverGorro(playerid);
    UsandoGorro[playerid] = false;
    return 1;
}
Reply

/handsup integrado no gm ( por dcmd)

pawn Код:
forward Handsup(playerid);
public Handsup(playerid)
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
}

dcmd_handsup(playerid, params[])
    {
        #pragma unused params

        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
        SetTimerEx("Handsup",500,false, "i", playerid);
        return 1;
    }
Reply

Quote:
Originally Posted by Sampizito
Посмотреть сообщение
/handsup integrado no gm ( por dcmd)

[PWN]
forward Handsup(playerid);
public Handsup(playerid)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
}

dcmd_handsup(playerid, params[])
{
#pragma unused params

SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
SetTimerEx("Handsup",500,false, "i", playerid);
return 1;
}
[/PWN]
Nгo й [ PWN ] й [ PAWN ].
Reply

Quote:
Originally Posted by Sampizito
Посмотреть сообщение
/handsup integrado no gm ( por dcmd)

Код:
forward Handsup(playerid);
public Handsup(playerid)
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
}

dcmd_handsup(playerid, params[])
	{
	    #pragma unused params

	    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
	    SetTimerEx("Handsup",500,false, "i", playerid);
	    return 1;
	}
nгo seria mais fбcil:
pawn Код:
dcmd_handsup(playerid, params[])
{
    #pragma unused params
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
    return 1;
}
??
Reply

Quote:
Originally Posted by [O.z]Caroline
Посмотреть сообщение
Converter Cor HTML para PAWN

Fiz esta funзгo quando estava criando sistema de gang para um amigo meu.
ele й bem simples.
pawn Код:
static stock ConvertHtmlColorToPawn(color[])
{
    static s[20];
    format(s, strlen(color),"0x%sFF", color);
    return strval(s);
}
USO:
pawn Код:
SendClientMessage(playerid,  ConvertHtmlColorToPawn("000099"), "Olб, Esta mensagem й azul");
Isso nгo funciona.
Reply

Quote:
Originally Posted by [S]trong
Посмотреть сообщение
Isso nгo funciona.
na minha teoria parecia funcionar, vou averiguar ..
Reply

Nгo й bem assim que funciona strval.
Reply


Forum Jump:


Users browsing this thread: 14 Guest(s)