Jump to content
  • 0

1 Intrebare


Doggy

Question

Imi pare rau daca incalc vreo regula sau ceva de genu dar...

Se poate sa creezi o comanda pe care sa o poata accesa numa un anumit player sau 2-3 playeri?

De genul

if(strcmp(cmdtext, "/yleader", true) == 0)
{
// Set the player's skin to ID 277, which is a fireman.
SetPlayerSkin(playerid, 120);
return 1;
}

Nu stiu.. in loc de player id sa fie acel plaier anume sau acei 2-3 ?

Multumesc in avantaj.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Here you have bro:

if(strcmp(cmdtext, "/yleader", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
		    new Nume[MAX_PLAYER_NAME];
		    GetPlayerName(playerid,Nume,sizeof(Nume));
		    if(!strcmp(Nume, "Nume1", true) || !strcmp(Nume, "Nume2", true) || !strcmp(Nume, "Nume3", true))
	     	{
				SetPlayerSkin(playerid, 120);
			}
			else
			{
			    SendClientMessage(playerid,-1,"Nu esti autorizat sa folosesti aceasta comanda!");
			    return 1;
			}
		}
		return 1;
	}

______________

Salutari... :D

Working on:

-[FS]iTuning (With ALL components & Neons).

-[FS]iRadar (Advanced Speed Cameras).

Link to comment
Share on other sites

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.