[Ajuda] Salario para todos online
#1

Queria q esse comando de dar salario fosse para todos os players e nгo sу para quem faz

PHP код:
if(!strcmp(cmdtext,"/darsalario",true)) {
    if(
pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == || pAdmin[playerid] == 5){
    }
    new 
string[128];
    new 
snd[MAX_PLAYER_NAME];
    
GetPlayerName(playeridsndsizeof snd);
    new 
RandomPay random(5000 725) + 725;
    
GivePlayerGranaplayeridRandomPay );
    
format(stringsizeof string"Vocк recebeu salario, vб depositar"snd);
    
SendClientMessageToAll(0xFFFF00AAstring);
    return 
true;

Reply
#2

pawn Код:
if(!strcmp(cmdtext,"/darsalario",true)) {
    if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5){
    new string[128];
    new snd[MAX_PLAYER_NAME];
    GetPlayerName(playerid, snd, sizeof snd);
    new RandomPay = random(5000 - 725) + 725;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    GivePlayerGrana(i, RandomPay);
    }
    format(string, sizeof string, "Vocк recebeu salario, vб depositar", snd);
    SendClientMessageToAll(0xFFFF00AA, string);
    }
    return true;
}
Reply
#3

pawn Код:
if(!strcmp(cmdtext,"/darsalario",true))
{
    switch(pAdmin[playerid])
    {
        case 1..5:
        {  
            new RandomPay = random(5000 - 725) + 725;
            for(new pt = 0; pt < MAX_PLAYERS; pt++)
                GivePlayerGrana(pt, RandomPay);
            SendClientMessageToAll(0xFFFF00AA, "Vocк recebeu salario, vб depositar");
        }
        default: SendClientMessage(playerid, 0xFFFF00AA, "Nao tens permissao");
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)