Jump to content

Cum sa faci o comanda care sa le dea cate ceva la fiecare player?


herodot

Recommended Posts

Pai este chiar foarte simplu prima oara incepeti ca la orice comanda

	if(strcmp(cmd, "/comada", true) == 0)
	{
care deasemenea trebuie pusa la
public OnPlayerCommandText(playerid, cmdtext[])
acum daca vrem ca comanda sa fie poata data doar de admini o sa punem
			if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
sau ce sistem de admini aveti voi eu il folosesc pe cel de la penls acum comanda va arata astfel
	if(strcmp(cmd, "/comada", true) == 0)
	{
			if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
dupa va urma ceva diferit fata de comenzile normale :D
for(new i = 0; i < MAX_PLAYERS; i ++)
				{
asta arata ca de acum i va insemna pentru toti playeri(desigur doar in comanda asta ) dupa vom alege ce sa facem eu o sa aleg healall
SetPlayerHealth(playerid,value);
playerid il vom schimba cu i si value vom pune cata viata sa ii dea deci
SetPlayerHealth(i,100);
acum comanda va arata in acest fel
	if(strcmp(cmd, "/comada", true) == 0)
	{
			if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
                                      for(new i = 0; i < MAX_PLAYERS; i ++)
				         {
                                               SetPlayerHealth(i,100);// dupa incepem sa incheiam comanda
}
}
return 1;
}

/// si astfel ati facut comanda /healall in orice caz daca aveti vreo nelamurire va rog postati :D

ps imi cer scuze pentru identuri

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.