SA-MP Forums Archive
[HELP] Plant and Pickup - 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: [HELP] Plant and Pickup (/showthread.php?tid=154036)



[HELP] Plant and Pickup - joeri55 - 12.06.2010

Alright, I'm a noob and I don't have a fucking clue how to make something like a /pickup and /plant weed cmd.

I've tried something but it's so HARD.

This is what I got.

Код:
	if(strcmp(cmd, "/plant weed", true) == 0 || strcmp(cmd, "/plw", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pSeed] < 0 )
			{
			  SendClientMessage(playerid, COLOR_GRAD1, "  You don't have a seed!");
			  return 1;
			}
			if(PlayerInfo[playerid][pSeed] > 1 )
			{
				GetPlayerPos(playerid)
				CreateObject(playerid,x,y,z)
  			}
		}
		return 1;
	}


	if(strcmp(cmd, "/pickitem", true) == 0 || strcmp(cmd, "/pi", true) == 0)	{
	  if(IsPlayerConnected(playerid))
	  {
			}

  			}
		}
		return 1;
	}



Re: [HELP] Plant and Pickup - ViruZZzZ_ChiLLL - 12.06.2010

here :
pawn Код:
new Float:x, Float:y, Float:z;
if(PlayerInfo[playerid][pSeed] > 1 )
{
GetPlayerPos(playerid, x, y, z);
CreateObject(modelid, x, y, z, 0, 0, 0);
 }



Re: [HELP] Plant and Pickup - joeri55 - 12.06.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
here :
pawn Код:
new Float:x, Float:y, Float:z;
if(PlayerInfo[playerid][pSeed] > 1 )
{
GetPlayerPos(playerid, x, y, z);
CreateObject(modelid, x, y, z, 0, 0, 0);
 }
Thanks for that, now I need to make something that the weed object pops out of the ground when you /plant weed.

And does anyone know how the script /pickitem?