Jump to content
  • 0

O comanda/ FS


AGaaA

Question

3 answers to this question

Recommended Posts

  • 0

.... am gasit-o intr-un GM mai vechi aceasta comanda

new Seatbelt[MAX_PLAYERS];

if(strcmp(cmd, "/centura", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			new newcar = GetPlayerVehicleID(playerid);
			if(!strlen(result) && IsPlayerInAnyVehicle(playerid) == 0 || IsPlayerInAnyVehicle(playerid) && IsABMX(newcar) || IsPlayerInAnyVehicle(playerid) && IsAScuterCar(newcar) || IsPlayerInAnyVehicle(playerid) && IsAMotor(newcar))
			{ //line 124
				SendClientMessage(playerid, COLOR_GRAD2, "Trebuie sa fi intr-o masina pentru ati pune centura.");
				return 1;
			}
		    if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 0)
			{
                Seatbelt[playerid] = 1;
                //SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000, 1.500000, 1.500000);
		        //SetPVarInt(playerid, "ova",CreateObject(1044,0,0,0,0,0,0)); 099879
		        //AttachObjectToVehicle(GetPVarInt(playerid, "ova"), GetPlayerVehicleID(playerid),2, 18634, 7,0.100000, 0.200000, 0.300000, -65.224993, 45.215000, 1.500000, 5.000000, 1.500000, 1.500000); //Object Model: 18634 |
		        format(string, sizeof(string), "* %s si-a pus centura.", sendername);
			}
			else if(IsPlayerInAnyVehicle(playerid) == 1 && Seatbelt[playerid] == 1)
			{
				Seatbelt[playerid] = 0;
				for(new i;i<5;i++) RemovePlayerAttachedObject(playerid,i);
				//DestroyObject(GetPVarInt(playerid, "ova"));
				format(string, sizeof(string), "* %s si-a dat jos centura.", sendername);
			}
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			printf("%s", string);
		}
		return 1;
	}

nu cred ca e nevoie sa iti explic fiecare functie in parte, daca chiar e nevoie iti explic

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.