Jump to content
  • 0

Problema mai complicata..


Question

Posted

Vreau sa fac o factiune care sa se numeasca Tow Car Company si care sa poata ridica masini parcate neregulamentar etc. Comanda este /towcar si poate fi folosita pe orice masina, inclusiv cele personale. Pentru deblocare sa se plateasca o taxa, si comanda pt deblocare sa fie /unlockcar. Stiu ca este complicat ce vreau eu dar nu imposibil. V-as ruga sa ma ajutati cu comanda /towcar, care sa blocheze masina si sa nu poata intra nimeni in ea, decat cei din TCC, si /unlockcar, pt a debloca masina. Si imi puteti spune unde gasesc un fs/cod ceva sa pot tracta masinile va rog?

6 answers to this question

Recommended Posts

Posted

Te pot ajuta sa faci factiunea si cu comanda towcar

1. cum creezi factiunea urmeaza acest tutorial http://forum.sa-mp.ro/index.php?topic=1585.0

2. comanda tow o bagi la OnPlayerCommandText

//-------------------------------------[TOW]--------------------------------------------
	if(strcmp(cmdtext, "/tow", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pMember] == NUMARUL FACTIUNI || PlayerInfo[playerid][pLeader] == NUMARUL FACTIUNI)
			{
			    if(IsPlayerInVehicle(playerid, 272) || IsPlayerInVehicle(playerid, 273) || IsPlayerInVehicle(playerid, 274) || IsPlayerInVehicle(playerid, 275))
				{
				    if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
					{
					    if(PlayerInfo[playerid][pTow] >= 1)
					    {
					        PlayerInfo[playerid][pTow] -= 1;
					    	CP[playerid] = 111;
							SetPlayerCheckpoint(playerid, 2412.4646,-1426.3083,23.9848, 5.0);
							SendClientMessage(playerid, COLOR_YELLOW, "Drive to Warehouse to destroy the towed car.");
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GRAD1, "	You cannot tow any car till PayDay.");
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GRAD1, "   You dont towed a car !");
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD1, "   You are not in a Tow Truck !");
				}
			}
		}
	}
Schimbi numarul factiuni cu numarul care lai bagat la factiune iar dupaia te duci la OnPlayerEnterCheckpoint si adaugi
else if(CP[playerid]==numarul checkpoint-ului)//TCC
	{
		new towedcar;
		towedcar = GetVehicleTrailer(GetPlayerVehicleID(playerid));
		GivePlayerMoney(playerid, 5000);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "You destroyed the car for $5000");
		GameTextForPlayer(playerid, "~b~Car was successful destroyed", 2500, 1);
		SetVehicleToRespawn(towedcar);
		DisablePlayerCheckpoint(playerid);
	}

schimbi numarul checkpoint-ului crescator daca mai ai alte checkpoint-uri daca nu adaugi 1 si stergi else si fata

Samp.OnlyPro.ro - RolePlay - Join Us !

Posted

Multumesc. Cum pot cara o masina cu masinutele alea cu carlig? Factiunea e creata..

LE: Ca sa fiu mai explicit, pe mine ma intereseaza sa ridic masina si sa o duc undeva, nu sa o distrug, cum este pe linkmania..

Posted

atunci nu mai baga checkpoint-ul daca nu vrei sa o distrugi

sau daca vrei sa ai o destinatie foloseste asta

else if(CP[playerid]==numarul checkpoint-ului)//TCC
	{
		new towedcar;
		towedcar = GetVehicleTrailer(GetPlayerVehicleID(playerid));
		GivePlayerMoney(playerid, 5000);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "You towed the car for $5000");
		GameTextForPlayer(playerid, "~b~Car was successful towed", 2500, 1);
		DisablePlayerCheckpoint(playerid);
	}

Samp.OnlyPro.ro - RolePlay - Join Us !

Posted

Ei bine acum ai si tu de lucru , dute intra in masina cu carlig , iesi si dai /old car acum dute in gm adauga codu asta la OnPlayerStatChange

if(newcar == NUMARUL || newcar == NUMARUL || newcar == NUMARUL || newcar == NUMARUL || newcar == NUMARUL)
		{
			if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14){ }
			else
			{
			    SendClientMessage(playerid, COLOR_GREY, "   Nu esti in Tow Car Company !");
			    RemovePlayerFromVehicle(playerid);
            }
		}

in loc de numarul pui codurile de la /oldcar eu tiam pus mai multe newcar in caz ca ai mai multe masini cu carlig daca ai decat 1 stergeo

Samp.OnlyPro.ro - RolePlay - Join Us !

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.