[Pedido] Comando para funcionar
#1

Qual e a funзгo que fais o comando funcionar com minha conta
quero que o comando funcionar so com o meu nome

tipo
}

if(strcmp(cmd, "/aclima", true) == 0)
{
if(pAdmin[playerid] > 2) // nome da minha conta
{
new Previsao;

Previsao = random(sizeof(WeatherName));
if(Previsao >= 1 && Previsao <= 50)
{
SetWeather(Previsao);
}
format(string, sizeof(string), "O clima de hoje й: %s", WeatherName[Previsao]);
SendClientMessageToAll(0xFFFFFFAA, string);
}
else
{
SendClientMessage(playerid, Vermelho, "Vocк nгo e um admin!");
}
return 1;
Reply
#2

pawn Код:
if(strcmp(cmd, "/aclima", true) == 0)
{
    new aname[MAX_PLAYER_NAME], Previsao;
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    if(!strcmp(aname,"PT",true))
    {
        Previsao = random(sizeof(WeatherName));
        if(Previsao >= 1 && Previsao <= 50)
        {
            SetWeather(Previsao);
        }
        format(string, sizeof(string), "O clima de hoje й: %s", WeatherName[Previsao]);
        SendClientMessageToAll(0xFFFFFFAA, string);
    }
    else SendClientMessage(playerid, Vermelho, "Vocк nгo e o PT!");
    return 1;
}
Reply
#3

Quando for colocar um cod, no comeзo digite [ pawn ] e no final [ /pawn ] ou [ php ] [ /php ] (sem o espaзo)p ara ficar + organizado ...

agr o cod, tente isso ...

PHP код:
GetPlayerName(playeridsendername256);
        if(
strcmp(sendername,"Seu_Nik",true)==|| strcmp(sendername,"Seu_Nick",true)==0
Reply
#4

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/aclima", true) == 0)
{
    new aname[MAX_PLAYER_NAME], Previsao;
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    if(!strcmp(aname,"PT",true))
    {
        Previsao = random(sizeof(WeatherName));
        if(Previsao >= 1 && Previsao <= 50)
        {
            SetWeather(Previsao);
        }
        format(string, sizeof(string), "O clima de hoje й: %s", WeatherName[Previsao]);
        SendClientMessageToAll(0xFFFFFFAA, string);
    }
    else SendClientMessage(playerid, Vermelho, "Vocк nгo e o PT!");
    return 1;
}
I am love PT Ўgracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)