Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Question

Posted

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

3 answers to this question

Recommended Posts

Posted

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!

Posted

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

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.