SA-MP Forums Archive
How do i do this?? - 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: How do i do this?? (/showthread.php?tid=68408)



How do i do this?? - Drift_04 - 10.03.2009

How do i make a command where the player types a command and a wall will appear right in front of them as a shield? But they can only do it once untill the gamemode restarts...... Thankyou!!


~~[Drift]~~


Am i doing this wrong? why wont it work? - Drift_04 - 10.03.2009

i am trying to make it so when you type this is it takes money away from you and it places an object right where your standing, heres my code what am i doing wrong?

Код:
if (strcmp("/shield", cmdtext, true, 10) == 0)
	{
		if(GetPlayerMoney(playerid) <= 30000) return SendClientMessage(playerid,red, "You need $30,000$");
    new Float:x, Float:y, Float:z;
  		GetPlayerPos(playerid, x, y, z);
		CreateObject(974,x,y,z);
		GivePlayerMoney(playerid,-30000);
		return 1;
	}



Re: How do i do this?? - [HiC]TheKiller - 10.03.2009

pawn Код:
if (strcmp("/shield", cmdtext, true, 10) == 0)
    {
        if(GetPlayerMoney(playerid) <= 30000) return SendClientMessage(playerid,red, "You need $30,000$");
    new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        CreateObject(974,x,y+2,z);
        GivePlayerMoney(playerid,-30000);
        return 1;
    }
Try that!


Re: How do i do this?? - Drift_04 - 10.03.2009

thanks a lot man! =) hope it works.


Re: How do i do this?? - Drift_04 - 10.03.2009

hey man it works! thanks! =)