SA-MP Forums Archive
isplayer.......... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: isplayer.......... (/showthread.php?tid=65486)



isplayer.......... - thuron - 13.02.2009

Hello,
I want to get a isplayer(playerid) check so only me and a friend can use the command.
Is that possible in the following script, and if not, how can a add a simple isplayeradmin check?

this is the script:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

	if(strcmp(cmdtext, "/mainc", true) == 0)
	{

		MoveObject(gate1, -2326.4358, 453.8413, 75.5156, 1.00); //main close
		return 1;
 	}

	if(strcmp(cmdtext, "/maino", true) == 0)
	
	{

		MoveObject(gate1, -2326.3516, 453.9125, 69.5333, 1.00); //main open
	 	return 1;
	}
	if(strcmp(cmdtext, "/garagec", true) == 0)
	{

		MoveObject(gate2, -2312.6387, 473.1472, 72.7422, 1.00); //garage close
		MoveObject(gate4, -2324.5110, 472.9877, 72.7422, 1.00); //garage close
	
	}
	if(strcmp(cmdtext, "/garageo", true) == 0)
	{

		MoveObject(gate2, -2312.6445, 473.1638, 65.2422, 1.00); //garage open
		MoveObject(gate4, -2324.5110, 472.9877, 65.2422, 1.00); //garage open
	 	return 1;
	}


	if(strcmp(cmdtext, "/liftd", true) == 0)
	{

		MoveObject(gate3, -2327.4470, 452.4991, 28.6978, 2.00); //elevator down
		return 1;
	}
	if(strcmp(cmdtext, "/liftu", true) == 0)
	{

		MoveObject(gate3, -2327.4470, 452.4991, 69.9184, 2.00); //elevator up
		return 1;
 	}
Thanks already

Thuron


Re: isplayer.......... - Sandra18[NL] - 13.02.2009

I remember i made something like that.

I'll try to search


Edit:
[INC]EasyNames


Re: isplayer.......... - thuron - 13.02.2009

dank je