/giveallscore - bug
#5

PHP код:
CMD:giveallscore(playerid,params[]) 

    if(
Spawned[playerid] == 0) return SendClientMessage(playerid0xf8f8f8fff,"ERROR: {F00f00}You can't use this command while you are not spawned!"); 
    if(
PlayerInfo[playerid][pAdmin] >= 5
    { 
    new 
string[128]; 
    new 
amount
    new 
pname[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridpname,sizeof(pname)); 
    if(
sscanf(params,"i",amount)) return SCM(playerid0xf8f8f8fff,"Syntax: {f00f00}/giveallscore <amount>"); 
    if(
amount || amount 900000) return SCM(playerid0xf8f8f8fff,"ERROR: {FFFFFF}900000 is high amount can be used!"); 
    foreach(
Playeri
    { 
    
//SetPlayerScore(GetPlayerScore(i), amount); 
   
SetPlayerScore(iGetPlayerScore(i) + amount); 
    
format(string,sizeof(string),"{ffa700}Administrator {f00f00}%s {ffa700}has given all {f00f00}%d {ffa700}score!",pname,amount); 
    
SendClientMessage(i, -1string); 
    } 
    } 
    else 
    { 
    
SCM(playerid0xf8f8f8fff,"ERROR: {FFFFFF}You aren't authorized to use this command!"); 
    } 
    return 
1

This would work
Reply


Messages In This Thread
/giveallscore - bug - by RxErT - 25.05.2017, 08:28
Re: /giveallscore - bug - by Threshold - 25.05.2017, 08:29
Re: /giveallscore - bug - by RxErT - 25.05.2017, 08:36
Re: /giveallscore - bug - by Coraxx - 07.03.2018, 07:42
Re: /giveallscore - bug - by BulletRaja - 07.03.2018, 08:28

Forum Jump:


Users browsing this thread: 1 Guest(s)