SA-MP Forums Archive
I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - 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: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK (/showthread.php?tid=140841)



I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - RobShakur - 10.04.2010

my command (DONT WORK):
Код:
if(!strcmp(cmdtext,"/openall",true))
	{
  if(GetPlayerSkin(playerid) == 285)
	if(GetPlayerSkin(playerid) == 267)
	if(GetPlayerSkin(playerid) == 280)
	if(GetPlayerSkin(playerid) == 281)
	if(GetPlayerSkin(playerid) == 282)
	if(GetPlayerSkin(playerid) == 283)
	if(GetPlayerSkin(playerid) == 284)
	if(GetPlayerSkin(playerid) == 286)
	if(GetPlayerSkin(playerid) == 288)
  MoveObject(MassenZelle, 3612.190918, -1683.627075, 4.788385, 9);
  if(GetPlayerSkin(playerid) == 285)
	if(GetPlayerSkin(playerid) == 267)
	if(GetPlayerSkin(playerid) == 280)
	if(GetPlayerSkin(playerid) == 281)
	if(GetPlayerSkin(playerid) == 282)
	if(GetPlayerSkin(playerid) == 283)
	if(GetPlayerSkin(playerid) == 284)
	if(GetPlayerSkin(playerid) == 286)
	if(GetPlayerSkin(playerid) == 288)
  MoveObject(AlleZellen, 3624.138672, -1672.828125, 8.700000, 9);
	return 1;
	}



Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - Torran - 10.04.2010

You should reallylearn how to script
Theres plenty of tutorials here: http://wiki.sa-mp.com


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - RobShakur - 10.04.2010

i can script but that no


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - Torran - 10.04.2010

Quote:
Originally Posted by RobShakur
i can script but that no
Can you script or do you think you can script?
Because judging by that code you cant..


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - RobShakur - 10.04.2010

oh my good
okay im beginner that was you heard from me ?


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - boelie - 10.04.2010

There are more and better ways but here is an example;

Код:
		if (!strcmp("/healing",cmdtext,true))
	  {
   	new copskin = GetPlayerSkin(playerid);
  	if( (copskin == 287) || (copskin == 163) || (copskin == 282) || (copskin == 255) || (copskin == 165))
		{
		SendClientMessage(playerid, 0x0000FF96, "== You are a cop.");
		SetPlayerHealth(playerid, 100.0);
		SetPlayerArmour(playerid,100);
		
		}
		else
		{
		SendClientMessage(playerid, 0xFFFF00AA, "== You are not a cop!.");
	  }

	  }
Replace setplayerhealth and gviegplayerarmour with your moveobject stuff


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - Torran - 10.04.2010

Quote:
Originally Posted by boelie
There are more and better ways but here is an example;

Код:
		if (!strcmp("/healing",cmdtext,true))
	  {
   	new copskin = GetPlayerSkin(playerid);
  	if( (copskin == 287) || (copskin == 163) || (copskin == 282) || (copskin == 255) || (copskin == 165))
		{
		SendClientMessage(playerid, 0x0000FF96, "== You are a cop.");
		SetPlayerHealth(playerid, 100.0);
		SetPlayerArmour(playerid,100);
		
		}
		else
		{
		SendClientMessage(playerid, 0xFFFF00AA, "== You are not a cop!.");
	  }

	  }
Replace setplayerhealth and gviegplayerarmour with your moveobject stuff
You dont need all the ( and ), Only some,


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - boelie - 10.04.2010

Quote:

You dont need all the ( and ), Only some,

Now im curious how would you make thise (and,and,and) then ?


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - Torran - 10.04.2010

pawn Код:
if(GetPlayerSkin == SKINID || GetPlayerSkin == SKINID || GetPlayerSkin == SKINID || GetPlayerSkin == SKINID)
There.


Re: I need this with more skins (CMD ONLY COPS CAN OPEN MOVEOBJECTS) DONT WORK - shady91 - 10.04.2010

use switch for the skins its much more efficient.