Jump to content

Cerere tutorial sistem slap (factiuni)


MAXYMUSS

Recommended Posts

Descriere tutorial: Vreau si eu sa fac un sistem ca pe bug...(stit la ce server ma refer nu stiu daca am voie sa scriu) ca atunci cand dau f intr-o masina de la o factiune din care nu fac parte sa ma dea in sus cate-va secunde nu sa intru in masina si pe urma sa ma scoate , va multumesc !

Link to comment
Share on other sites

Am incercat sa fac asta : cu setplayerpos dar ii da "slap" cand se suie in masina nu inainte : 

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new i = vehicleid;
	new Float: playerP[3];
	GetPlayerPos(playerid, playerP[0], playerP[1], playerP[2]);
	if(!ispassenger)
	{
		if(vehicleVariables[vVehicleGroup] != 0 && vehicleVariables[vVehicleGroup] != playerVariables[playerid][pGroup])
		{
			if(playerVariables[playerid][pAdminLevel] < 1)
			{
				if((playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 10) && (vehicleVariables[vVehicleGroup] == 1 || vehicleVariables[vVehicleGroup] == 10))
				{
					return 1;
				}
				format(szMessage, sizeof(szMessage), "Nu faci parte din %s.", groupVariables[vehicleVariables[vVehicleGroup]][gGroupName]);
				SCM(playerid, COLOR_GREY, szMessage);
				RemovePlayerFromVehicle(playerid);
				SetPlayerPos(playerid, playerP[0], playerP[1], playerP[2]+2.0);
				return 1;
			}
			else
			{
				return 1;
			}	
		}

Edited by MAXYMUSS
  • Upvote 1
Link to comment
Share on other sites

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.