/giveallcash command? [REP+]
#1

Hi all. Who can create for me one /giveallmoney command? And please look this
pawn Код:
COMMAND:giveallmoney(playerid, params[])
Please for admin level 5. And when admin using /giveallcash 50000 maybe And send all text All players Win 50 000$(or much)
Reply
#2

wheres the rest of it?

do you want a command that gives all players cash?

ill write ya one up one min.
Reply
#3

Yea command /giveallcash Giving all people money maybe /giveallcash 50000 And for level 5 Admin please !
Reply
#4

Level 5 on what?
Код:
COMMAND:giveallcash(playerid, params[])	
	{
	new amount = strval(params),output[128];
	format(output,sizeof(output),"Win %d",amount);
	for(new i = 0;i<MAX_PLAYERS;i++)
		{
		GivePlayerMoney(i,amount);
		SendClientMessage(i,0xFFFFFFFF,output);
		}
	}
Reply
#5

well i dont know how you do your levels and such youll have to work it out from this command

pawn Код:
COMMAND:giveallcash(playerid, params[]){
    for(new i=0;i<MAX_PLAYERS;i++) GivePlayerMoney(playerid, strval(params));
}
without you posting any code and asking for help is really hard for us to provide you help
show an example of your "level" code from your GM and ill show you how to add it in the command.

you need to learn these things so you wont have to ask later on
Reply
#6

pawn Код:
COMMAND:giveallcash(playerid,params[])
{
    if(AdminLevel[playerid]<5) return SendClientMessage(playerid,COLOR_RED,"This command is only for admins!");
    else
    {
     new cash;
     if(sscanf(params,d,cash)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/giveallcash [Ammount]");
     for(new i=0;i<=MAX_PLAYERS;i++)
     {
       GivePlayerMoney(i,cash);
     }
    }
    SendClientMessage(playerid,COLOR_GREEN,"You gave money to all player");
  return 1;
}//EDIT:We cannot know what variable u declared for admin levell :P
Reply
#7

Cjgogo i get this errors:
pawn Код:
C:\Documents and Settings\rado\Desktop\Trucking Server 0.3d\pawno\include\PPC_GameModeInit.inc(570) : warning 217: loose indentation
C:\Documents and Settings\rado\Desktop\Trucking Server 0.3d\pawno\include\PPC_GameModeInit.inc(573) : warning 217: loose indentation
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 017: undefined symbol "AdminLevel"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : warning 215: expression has no effect
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 029: invalid expression, assumed zero
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#8

Quote:
Originally Posted by [FoR]EveR
Посмотреть сообщение
Cjgogo i get this errors:
pawn Код:
C:\Documents and Settings\rado\Desktop\Trucking Server 0.3d\pawno\include\PPC_GameModeInit.inc(570) : warning 217: loose indentation
C:\Documents and Settings\rado\Desktop\Trucking Server 0.3d\pawno\include\PPC_GameModeInit.inc(573) : warning 217: loose indentation
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 017: undefined symbol "AdminLevel"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : warning 215: expression has no effect
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : error 029: invalid expression, assumed zero
C:\Documents and Settings\rado\Desktop\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(1502) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
His version required you to modify it according to your gamemode to the appropriate variables.
Reply
#9

Yes, as he said, you need to change the "AdminLevel" to whatever variable you have in your scripty.
Reply
#10

do you not read?

he and I clearly asked you for code to show us how to handle the level
we cannot guess what code you have in your file,
and will not download the game mode your using just to see.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)