[POMOC]/v

Započeo JONY, Septembar 09, 2011, 23:49:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:Moj edit moda
Detaljan opis problema:Ewo moja cijela komanda /v znaci ingame kad upisem /v pise mi upisali ste komadnu koja ne postoji a kad upisem /v parkiraj onda radi ili nest drugo sa v da mi izbaci ono sve sto ima nabrojano ako neko zna bio bi zahvalan znaci ako /v samo da izbaci koristi /v [ime]

i ovde imena tu sve ima al nez sta je problem
Dio skripte:
CMD:v(playerid, params[])
	{
		new string[128];
		new x_job[128];
		new idx;
		
	
		x_job = strtok(params, idx);
		if(!strlen(x_job) && Carlist[playerid][Typ]!=-1) {
		format(string,sizeof(string), "{0080C0}___________________{76BBDD}%s{0080C0}___________________", LVehiclesName[Carlist[playerid][VehModel]-400]);
		SendClientMessage(playerid, 0x94B6B6FF, string);
		SendClientMessage(playerid, 0x5A8E8EFF,"{B1D8EB}|POMOC: {76BBDD}Kucaj {0080C0}/gps # {76BBDD}da oznacis car shop!");
		SendClientMessage(playerid, 0x6C9A9AFF,"{B1D8EB}|AUTO| {0080C0}(/v)ozilo prodaj, boja, lociraj, parkiraj");
		SendClientMessage(playerid, 0x7CA5A5FF,"{B1D8EB}|AUTO| {0080C0}(/v)ozilo napusti, izvadi, ostavi");
		format(string,sizeof(string), " {B1D8EB}Registarske tablice: {0080C0}%s ", Carlist[playerid][BrojRegistracije]);
		SendClientMessage(playerid, 0x94B6B6FF, string);
		if(PlayerInfo[playerid][pVehDroga] > 0)
		{
		format(string,sizeof(string), " {B1D8EB}Droga: {0080C0}%d ", PlayerInfo[playerid][pVehDroga]);
		SendClientMessage(playerid, 0x94B6B6FF, string);
		
		}
		if(PlayerInfo[playerid][pVehMatsi] > 0)
		{
		format(string,sizeof(string), " {B1D8EB}Materijali:{0080C0} %d ", PlayerInfo[playerid][pVehMatsi]);
		SendClientMessage(playerid, 0xA2BFBFFF, string);
		
		}
		if(PlayerInfo[playerid][pVehDroga] == 0 && PlayerInfo[playerid][pVehMatsi] == 0)
		{
		SendClientMessage(playerid, 0x94B6B6FF, "{B1D8EB}Tvoj prtljaznik je prazan!");
		
		}
				return 1;
			}
			else if(strcmp(x_job,"ostavi",true) == 0)
		{
		
	   if(Carlist[playerid][Typ]!=-1)
	    {
			{
				new x_nr[128];
				x_nr = strtok(params, idx);
				if(!strlen(x_nr))
				{
					SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v ostavi [mats/droga] [kolicina]");
					return 1;
				}
				
			if(strcmp(x_nr, "mats", true) == 0)
					{
						
						new pstate;
				pstate=GetPlayerState(playerid);
				if(IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
				{
			
			 if(pstate == PLAYER_STATE_DRIVER && Carlist[playerid][Typ]!=-1)
			    {
					temp = strtok(params, idx);
						if(!strlen(temp))
							{
							SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v ostavi mats [kolicina]");
							return 1;
						}
					    moneys = strval(temp);
					    if(PlayerInfo[playerid][pMats] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, " Nemas Materijala !");
					        return 1;
						}
						if(PlayerInfo[playerid][pMats] < moneys)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko materijala !");
					        return 1;
						}
						if(moneys > 501 || moneys < 0)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
					        return 1;
						}
						if(PlayerInfo[playerid][pMats] >= moneys)
						{
						    PlayerInfo[playerid][pMats] -= moneys;
							PlayerInfo[playerid][pVehMatsi] += moneys;
							
							SacuvajIgraca(playerid);
						    format(string,sizeof(string), " {0080C0}Sakrio si %d Materijala u svoje Vozilo", moneys);
                            SendClientMessage(playerid, 0x698F8FFF, string);
						}
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi vozac/nemas vozila !");
				    return 1;
				}
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svom vozilu !");
				    return 1;
				}
				}
					if(strcmp(x_nr, "droga", true) == 0)
					{
							new pstate;
				pstate=GetPlayerState(playerid);
							if(IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
							{
							if(pstate == PLAYER_STATE_DRIVER && Carlist[playerid][Typ]!=-1)
							{
								temp = strtok(params, idx);
								if(!strlen(temp))
							{
								SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v ostavi droga [kolicina]");
								return 1;
							}
                        moneys = strval(temp);
					    if(PlayerInfo[playerid][pDrugs] < 0)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, " Nemas droge !");
					        return 1;
						}
						if(PlayerInfo[playerid][pDrugs] < moneys)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko droge !");
					        return 1;
						}
							if(moneys > 501 || moneys < 0)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
					        return 1;
						}
						if(PlayerInfo[playerid][pDrugs] >= moneys)
						{
							PlayerInfo[playerid][pDrugs] -= moneys;
							PlayerInfo[playerid][pVehDroga] += moneys;
							
							SacuvajIgraca(playerid);
						    format(string,sizeof(string), " {0080C0}Sakrio si %d grama Droge u vozilo", moneys);
                            SendClientMessage(playerid, 0x698F8FFF, string);
						}
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi vozac/nemas vozila !");
				    return 1;
				}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi  u svom vozilu !");
				    return 1;
				}
			}
	}
			if(Carlist[playerid][Typ] == -1)
			{
	   SendClientMessage(playerid, COLOR_GRAD6, "Nemas vozilo!");
	   return 1; 
			} 
			return 1; 
		} 
		}
		else if(strcmp(x_job,"izvadi",true) == 0)
		{
		
	   if(Carlist[playerid][Typ]!=-1)
	    {
			{
				new x_nr[128];
				x_nr = strtok(params, idx);
				if(!strlen(x_nr))
				{
					SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v izvadi [mats/droga] [kolicina]");
					return 1;
				}
				
			if(strcmp(x_nr, "mats", true) == 0)
					{
						
						new pstate;
				pstate=GetPlayerState(playerid);
				if(IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
				{
			
			    if(pstate == PLAYER_STATE_DRIVER && Carlist[playerid][Typ]!=-1)
			    {
					temp = strtok(params, idx);
						if(!strlen(temp))
							{
							SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v izvadi mats [kolicina]");
							return 1;
						}
					    moneys = strval(temp);
					    if(PlayerInfo[playerid][pVehMatsi] < 1)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, " Nemas Materijala u vozilu!");
					        return 1;
						}
						if(PlayerInfo[playerid][pVehMatsi] < moneys)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko materijala u vozilu!");
					        return 1;
						}
						if(moneys > 500 || moneys < 0)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
					        return 1;
						}
						if(PlayerInfo[playerid][pMats] >= moneys)
						{
						    PlayerInfo[playerid][pMats] += moneys;
							PlayerInfo[playerid][pVehMatsi] -= moneys;
							VehicleSave(playerid);
							SacuvajIgraca(playerid);
						    format(string,sizeof(string), "{0080C0}Izvadio si %d Materijala iz svog Vozila", moneys);
                            SendClientMessage(playerid, 0x698F8FFF, string);
						}
						
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi vozac/nemas vozila !");
				    return 1;
				}
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi u svom vozilu !");
				    return 1;
				}
				}
					if(strcmp(x_nr, "droga", true) == 0)
					{
							new pstate;
				pstate=GetPlayerState(playerid);
							if(IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
							{
							if(pstate == PLAYER_STATE_DRIVER && Carlist[playerid][Typ]!=-1)
							{
								temp = strtok(params, idx);
								if(!strlen(temp))
							{
								SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /izvadi droga [kolicina]");
								return 1;
							}
                        moneys = strval(temp);
					    if(PlayerInfo[playerid][pVehDroga] < 0)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, " Nemas droge u vozilu !");
					        return 1;
						}
						if(PlayerInfo[playerid][pVehDroga] < moneys)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Nemas toliko droge u vozilu !");
					        return 1;
						}
						if(moneys > 500 || moneys < 0)
						{
      						SendClientMessage(playerid, COLOR_GRAD1, " Ne idi ispod 0 i preko 500 !");
					        return 1;
						}
						if(PlayerInfo[playerid][pDrugs] >= moneys)
						{
						    PlayerInfo[playerid][pDrugs] += moneys;
							PlayerInfo[playerid][pVehDroga] -= moneys;
							VehicleSave(playerid);
							SacuvajIgraca(playerid);
						    format(string,sizeof(string), "{0080C0} Izvadio si %d grama Droge iz Vozila", moneys);
                            SendClientMessage(playerid, 0x698F8FFF, string);
						}
					}
					else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi vozac/nemas vozila !");
				    return 1;
				}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " Nisi  u svom vozilu !");
				    return 1;
				}
			}
	}
			if(Carlist[playerid][Typ] == -1)
			{
	   SendClientMessage(playerid, COLOR_GRAD6, "Nemas vozilo!");
	   return 1; 
			} 
			return 1; 
		} 
		}
	
		if(strcmp(x_job,"napusti",true) == 0)
		{
	    if (Buylist[Spectating[playerid][0]][Carid])
	    {
            TogglePlayerControllable(playerid,1);
	        SetVehicleParamsForAll(Buylist[Spectating[playerid][0]][Carid],0,0);
	        Spectating[playerid][0]=-1;
	        RemovePlayerFromVehicle(playerid);
			TextDrawDestroy(imevozila[playerid]);TextDrawDestroy(cijenavozila[playerid]);TextDrawDestroy(registracijavozila[playerid]);
			TextDrawHideForPlayer(playerid, imevozila[playerid]);
			TextDrawHideForPlayer(playerid, cijenavozila[playerid]);
			TextDrawHideForPlayer(playerid, registracijavozila[playerid]);
		}
		
		else  {
		SendClientMessage(playerid, COLOR_GREY, "Nisi u izlozbenom vozilu!"); 
			}
		return 1; 
		}
		else if(strcmp(x_job,"parkiraj",true) == 0)
		{
				if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
			{
		    GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
		    GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
			new componentid = GetModType(componentid);
			OnVehicleMod(playerid,Carlist[playerid][Carid],componentid);
			VehicleSave(playerid);
		    SendClientMessage(playerid, COLOR_WHITE, "Tvoje ce se vozilo odsada ovdje spawnati!");
			return 1; 
			}
				else { SendClientMessage(playerid, COLOR_GREY, "Ovo nije tvoje vozilo/nisi u vozilu!"); }
				return 1; 
		}
		else if(strcmp(x_job,"lociraj",true) == 0)
		{
		 if (Carlist[playerid][Typ] == -1)
		{ 
		SendClientMessage(playerid, COLOR_GREY, "Nemas vozilo!"); 
		return 1; 
		}
	 if (Carlist[playerid][Typ]!=-1)
		{
			{
				new Float:x, Float:y, Float:z;
				GetVehiclePos(Carlist[playerid][Carid], x, y, z);
				SetPlayerCheckpoint(playerid,x,y,z, 6.0);
				SendClientMessage(playerid, 0x0080C0FF, "Lokacija tvog vozila je postavljena na mapi!");
				return 1; 
			}

		}
		
		}
		
		else if(strcmp(x_job,"boja",true) == 0)
		{
		
		 
	   if(Carlist[playerid][Typ]!=-1)
	    {
			{
				temp = strtok(params, idx);
				if(!strlen(temp))
				{
					SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v boja [boja 1-2] [ID boje]");
					return 1;
				}
				new number = strval(temp);
				if(number > 2 || number < 1)
				{
					SendClientMessage(playerid, COLOR_GRAD3,"Boja 1 ili 2!");
					return 1;
				}
				temp = strtok(params, idx);
				if(!strlen(x_job))
				{
					SendClientMessage(playerid, COLOR_GRAD3,"{168BFF}INFO: {959561} /v boja [boja 1-2] [ID boje]");
					return 1;
				}
				new color = strval(temp);
				if(color > 126)
				{
					SendClientMessage(playerid, COLOR_GRAD3,"Najveci ID boje je 126");
					return 1;
				}
				if (GetPlayerCash(playerid) < 3000)
				{
					SendClientMessage(playerid, COLOR_GRAD3,"Nemas dovoljno novca ($3000)");
					return 1; 
				}
				if(number == 1)
				{
					Carlist[playerid][Color1] = color;
					VehicleSave(playerid);
					format(string, sizeof(string), "Boja 1 postavljena na ID %d -$3000",color);
					SendClientMessage(playerid, 0x0080C0FF,string);
					
				}
				else
				{
					Carlist[playerid][Color2] = color;
					VehicleSave(playerid);
					format(string, sizeof(string), "Boja 2 postavljena na ID %d -$3000",color);
					SendClientMessage(playerid, 0x0080C0FF,string);	
				}
				SendClientMessage(playerid, COLOR_GRAD6, "Tvoj nova boja ce stici uskoro(poslije reloga)!");
   				GivePlayerCash(playerid,-3000);
				
				}
			}
			if(Carlist[playerid][Typ] == -1)
			{
	   SendClientMessage(playerid, COLOR_GRAD6, "Nemas vozilo!");
	   return 1; 
			} 
			return 1; 
		} 
		else if(strcmp(x_job,"prodaj",true) == 0)
		{
			if (Carlist[playerid][Typ]!=-1)
			{
			new price = (Carlist[playerid][Cijena])/5*4;
	        if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])) { RemovePlayerFromVehicle(playerid); }
	        GivePlayerCash(playerid, price);
	        DestroyVehicle(Carlist[playerid][Carid]);
			Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
			Carlist[playerid][Rotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
			Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
			Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
			Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
			Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
			Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][Paintjob]=-1;
			Carlist[playerid][Vlasnik] = 0;
			Carlist[playerid][CarMats] = 0;
			Carlist[playerid][CarDroga] = 0;
			PlayerInfo[playerid][pVehDroga] = 0;
			PlayerInfo[playerid][pVehMatsi] = 0;
			SacuvajIgraca(playerid);
			VehicleSave(playerid);
			PlayerInfo[playerid][pVoziloSpawnano] = 0;
			format(string,128,"{2994CA}Prodao si svoje vozilo za {AED6EB}$%i!",price);
			SendClientMessage(playerid, 0x698F8FFF, string);
			return 1; 
	    }
	    else { SendClientMessage(playerid, COLOR_GREY, "Nemas vozilo!"); }
		return 1;
		}
		else if(strcmp(x_job,"spawn",true) == 0)
		{
		if (PlayerInfo[playerid][pVoziloSpawnano] == 0)
	    {
			GetPlayerPos(playerid ,Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
			GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
			GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
			GetXYInFrontOfPosition(Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Rotation],5.0); 
			Carlist[playerid][Carid] = CreateTunedCar(playerid);
			SetVehicleNumberPlate(Carlist[playerid][Carid], Carlist[playerid][BrojRegistracije]);
			VehicleSave(playerid);
			PlayerInfo[playerid][pVoziloSpawnano] = 1;
			SacuvajIgraca(playerid);
			SendClientMessage(playerid, 0x698F8FFF, "Spawnao si svoje vozilo !");
			return 1; 
	    }
	    else { SendClientMessage(playerid, COLOR_GREY, "Nisi kupio vozilo!"); }
		return 1;
		}
		else if(strcmp(x_job,"lock",true) == 0)
	{
	    if (Carlist[playerid][Typ]!=-1)
	    {
			if (Carlist[playerid][Carid]!=-1)
			{
				if (Carlist[playerid][Lock]==0)
				{
				    Carlist[playerid][Lock]=1;
				    SetVehicleParamsForAll(Carlist[playerid][Carid],0,1);
				    SetVehicleParamsForPlayer(Carlist[playerid][Carid],playerid,0,1);
					SendClientMessage(playerid, 0x698F8FFF, "Zakljucao si svoje vozilo!");
				}
				else
				{
				    Carlist[playerid][Lock]=0;
				    SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
				    SendClientMessage(playerid, 0x698F8FFF, "Otkljucao si svoje vozilo!");
				}
			}
			else { SendClientMessage(playerid, COLOR_GREY, "Tvoje vozilo je pokvareno. Moras ga popraviti!"); }
		}
		else { SendClientMessage(playerid, COLOR_GREY, "Nemas vozilo!"); }
	    return 1;
	}
		
			return 1;
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno):




Poslednja Izmena: Septembar 10, 2011, 00:00:32 PRE PODNE od JONY