SA-MP Forums Archive
/giveallcash command? [REP+] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /giveallcash command? [REP+] (/showthread.php?tid=330771)



/giveallcash command? [REP+] - [FoR]EveR - 02.04.2012

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)


Re: /giveallcash command? [REP+] - Jonny5 - 02.04.2012

wheres the rest of it?

do you want a command that gives all players cash?

ill write ya one up one min.


Re: /giveallcash command? [REP+] - [FoR]EveR - 02.04.2012

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


Re: /giveallcash command? [REP+] - blank. - 02.04.2012

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);
		}
	}



Re: /giveallcash command? [REP+] - Jonny5 - 02.04.2012

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


Re: /giveallcash command? [REP+] - Cjgogo - 02.04.2012

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



Re: /giveallcash command? [REP+] - [FoR]EveR - 02.04.2012

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.



Re: /giveallcash command? [REP+] - blank. - 02.04.2012

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.


Re: /giveallcash command? [REP+] - freddy smyth - 02.04.2012

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


Re: /giveallcash command? [REP+] - Jonny5 - 02.04.2012

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.