Jump to content
  • 0

/up


ionutuidumanu

Question

Deci am o promblema la comanda /up,cand dau de ex /up 10 imi apare asa "Use correct: /up <Height>"

Uitati si comanda:

COMMAND:up(playerid,idx, params[])

{

    new Float:x, Float:y, Float:z;

        new tmp[256];

tmp = strtok(params,idx);

        new height = strval(tmp);

        if(height != 0)

        {

            if(IsPlayerInAnyVehicle(playerid))

            {

            GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);

            SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height);

            }

            else

            {

GetPlayerPos(playerid, x, y, z);

GivePlayerWeapon(playerid, 46, 1);

SetPlayerPos(playerid, x, y, z + height);

}

}

else

{

    SendClientMessage(playerid, COLOR_RED, "Use correct: /up <Height>");

}

return 1;

}

The Legend

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

incerca asa:

COMMAND:up(playerid, params[])
	{
	    new Float:x, Float:y, Float:z;
        tmp = strtok(cmdtext, idx);
        new height = strval(tmp);
        if(height != 0)
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
            	GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
            	SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height);
            }
            else
            {
				GetPlayerPos(playerid, x, y, z);
				GivePlayerWeapon(playerid, 46, 1);
				SetPlayerPos(playerid, x, y, z + height);
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "Correct usage: /up <height>");
		}
		return 1;
	}

Fara reclama in semnatura!

Link to comment
Share on other sites

Incearca asa:

CMD:up( playerid, params[ ] )
{
	new Float:x, Float:y, Float:z;
	new height = strval(params);
	if(height == 0) return SendClientMessage(playerid, COLOR_RED, "Use correct: /up <Height>");

	if(IsPlayerInAnyVehicle(playerid))
	{
		GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
		SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height);
	}
	else
	{
		GetPlayerPos(playerid, x, y, z);
		GivePlayerWeapon(playerid, 46, 1);
		SetPlayerPos(playerid, x, y, z + height);
	}
	return ( 1 );
}

142sj0l.png

Underground-GFX

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.