Jump to content
  • 0

Question

Posted

Can dau /getallhere apare: Administrator d@rK has teleported everyone to him  DE vreo 20 de ori :| :| :|

PAWNO:

[pawn]if(strcmp(cmd, "/getallhere", true) == 0)

{

    if(IsPlayerConnected(playerid))

{

if(PlayerInfo[playerid][pAdmin] >= 5)

{

    GetPlayerName(playerid, sendername, sizeof(sendername));

    for(new i = 0; i < MAX_PLAYERS; i ++)

    {

        if(IsPlayerConnected(i))

        {

format(string, 256, "Administrator %s has teleported everyone to himself.", sendername);

BroadCast(COLOR_LIGHTRED,string);

new Float:ix, Float:iy, Float:iz;

GetPlayerPos(playerid, ix, iy, iz);

SetPlayerInterior(i, GetPlayerInterior(playerid));

SetPlayerPos(i, ix, iy, iz+1);

      GetPlayerName(playerid, sendername, sizeof(sendername));

printf("[Warning] %s has teleported all players to him", sendername);

            ABroadCast(COLOR_LIGHTRED,string,1);

}

}

}

else

{

    SendClientMessage(playerid, COLOR_RED, "Nu ai acces la aceasta comanda!");

}

}

else

{

    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");

}

return 1;

}[/pawn]

6 answers to this question

Recommended Posts

Posted

Logic ca apare...daca ai pus functia care trimite mesajul (BroadCast in cazul de fata) intr-un for.

Si nu apare de 20 de ori, apare in functie de numarul de playeri de pe server. Daca ai 400 de jucatori, apare de 400 de ori.

Scoate functia din for si pune-o mai jos putin.

Posted
if(strcmp(cmd, "/getallhere", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 5)
			{
			    GetPlayerName(playerid, sendername, sizeof(sendername));
			    for(new i = 0; i < MAX_PLAYERS; i ++)
			    {
			        if(IsPlayerConnected(i))
			        {
						new Float:ix, Float:iy, Float:iz;
						GetPlayerPos(playerid, ix, iy, iz);
						SetPlayerInterior(i, GetPlayerInterior(playerid));
						SetPlayerPos(i, ix, iy, iz+1);
      					GetPlayerName(playerid, sendername, sizeof(sendername));
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "Nu ai acces la aceasta comanda!");
			}
			format(string, 256, "Administrator %s has teleported everyone to himself.", sendername);
			BroadCast(COLOR_LIGHTRED,string);
			printf("[Warning] %s has teleported all players to him", sendername);
            ABroadCast(COLOR_LIGHTRED,string,1);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}

plQ8h9B.jpg

Posted

Ma da ce faci deacuma iti postezi gamemodul pe bucati. Intelege ca esti la inceput, dar ia apucate sa inveti, ca eu in nici un caz nu o sa iti mai dau muran gura

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted

Scuze dar mai am doar vreo 2 probleme de rezolvat si termin si vreau sa-mi deschis serverul ... Si nu gasesc bodyweapons nicaieri..

Defapt am gasit un bodyweapons, dar am citit la el ca trebuie COMPILAT cu 0.3E si nush de unde sa iau includes de la 0.3E ...

Guest
This topic is now closed to further replies.
×
×
  • 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.