Jump to content

cr3azy

Membru
  • Posts

    43
  • Joined

  • Last visited

    Never

Posts posted by cr3azy

  1. Am si eu o problema la comanda /rb, cand tastez nu-mi apare nimic, trebuie sa ma misc putin intr-o parte pentru a aparea

    //----------------------------------------{RB]------------------------
    	if(strcmp(cmd, "/rb", true) == 0 || strcmp(cmd, "/roadblock", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3  || PlayerInfo[playerid][pAdmin] >= 3)
         	{
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GREY, "USAGE: /rb [Roadblock ID]");
    				SendClientMessage(playerid, COLOR_WHITE, "Available Roadblocks:");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 1: Small Roadblock | 2: Medium Roadblock |");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 3: Big Roadblock | 4: Cone | 5: Detour Sign |");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 6: Will Be Sign | 7: Line Closed Sign |");
    				SendClientMessage(playerid, COLOR_GRAD1, "| /rrb || /rrball |");
    				return 1;
    			}
                new rb = strval(tmp);
                if (rb == 1)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(1459,plocx,plocy,plocz,ploca);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);
    
    		        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 2)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(2) at his position, over.",sendername);
    			    GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 3)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(3) at his position, over.",sendername);
    
    		        GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
    		         SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
    				return 1;
    			}
    			else if (rb == 4)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Traffic Cone(1) at his position, over.",sendername);
    
    		        GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 5)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",sendername);
    
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 6)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",sendername);
    
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 7)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",sendername);
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}
    		}
    	    return 1;
    	}
    	else if (strcmp(cmd,"/rrb",true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 4)
         	{
       			roadb--;
            	DeleteClosestRoadblock(playerid);
            	GetPlayerName(playerid, sendername, sizeof(sendername));
            	format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",sendername);
    	        SendRadioMessage(1,COLOR_BLUE,string);
    	        GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);
    		}
    	    return 1;
    	}
     	if (strcmp(cmd,"/rrball",true) == 0 || strcmp(cmd, "/removeroadblockall", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && IsACop(playerid)  || PlayerInfo[playerid][pAdmin] >= 4)
         	{
    			if(PlayerInfo[playerid][pRank] >= 3 || PlayerInfo[playerid][pAdmin] >= 2) // This being the default Chief rank in LA-RP change if neccesary.
    			{
            		DeleteAllRoadblocks(playerid);
            		GetPlayerName(playerid, sendername, sizeof(sendername));
            		format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",sendername);
    
    	        	GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);
    			}
    		}
    	    return 1;
    	}

  2. Am si eu un gm godfather editat, iar cand dau o comanda /v setplate vreau sa imi apara un 3dtextlabel, dar nu apare nimic

      else if(strcmp(x_nr,"setplate",true) == 0)
    	        {
    				if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1)
    				{
    			        if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
                        {
                            SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /v setplate [newplate]");
                            return 1;
    				    }
    	                format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]);
                        SetVehicleNumberPlate(vehid,CarInfo[vehid][cLicense]);
    	                format(string, sizeof(string), "{FFFF00}You have set your vehicle's plate to:{FFFFFF} %s", CarInfo[vehid][cLicense]);
    	                SendClientMessage(playerid, 0xFFFFFFFF, string);
    	                OnCarUpdate(vehid); SavePlayerData(playerid);
                    	format(TextCar, sizeof(TextCar), "%s", CarInfo[vehid][cLicense]);
       					TextUpCar[vehid] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);
       					Attach3DTextLabelToVehicle(TextUpCar[vehid], vehid, 0.0, 0.0, 0.1);
       					Update3DTextLabelText(TextUpCar[vehid], 0x33AAFFFF, string);
    	            }
    	            else
    	            {
                        SendClientMessage(playerid, 0xFFFFFFAA, "Nu esti in masina ta personala pentru a putea schimba NR de Inmatriculare.");
    				    return 1;
    			    }
    			}

  3. Am o problema, deci am un gamemode GF editat si am un sistem de dealership la masini personale, totul ok, dar dupa ce cumpar masina as vrea sa-mi apara un 3dtext pentru ea, dar nu apare

    Code: [select]

    CarInfo[thiscar][cOwned] = 1;

    strmid(CarInfo[thiscar][cOwner], sendername, 0, strlen(sendername), 999);

    format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);

                format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);

    format(CarInfo[thiscar][cLicense], 32 ,"LS-10-Legacy");

    SetVehicleNumberPlate(thiscar,CarInfo[thiscar][cLicense]);

    format(TextCar, sizeof(TextCar), "%s", CarInfo[thiscar][cLicense]);

          TextUpCar[thiscar] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);

          Attach3DTextLabelToVehicle(TextUpCar[thiscar], thiscar, 0.0, 0.0, 0.1);

    Va rog daca puteti sa ma ajutati

  4. am si eu un sistem de maisini personale, si cand creezi o masina iti apare un dialog ca sa pui numele persoanei careia vrei sa ii creezi masina, si eu am vrut sa scot asta si am adaugat sa iti adauge numele tau cand creezi masina, dar numele nu se salveaza sub nici un fel , va rog sa ma ajutati daca puteti

    am scos asta

    if(dialogid==DIALOGIDSETOWNER)
    	{
    	    if(response)
    	    {
    	        new dokee[MAX_PLAYER_NAME];
    	        GetPlayerName(playerid,dokee,13);
    		 	if(IsPlayerInVehicle(playerid,idcar))
    	 		{
    				if(IsAnOwnableCar(idcar))
    		   		{
    					if(strlen(inputtext))
    					{
    						giveplayerid = ReturnUser(inputtext);
    						if(PlayerInfo[giveplayerid][pPcarkey] == -1) { }
    			  			else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { }
    				    	else { SendClientMessage(playerid, COLOR_GREY, "   That player allready have 2 cars"); return 1; }
    				    	if(CarInfo[idcar][cOwned]==1)
    						{
    			  				SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car");
    				    		return 1;
    						}
    						if(PlayerInfo[giveplayerid][pPcarkey] == -1) { PlayerInfo[giveplayerid][pPcarkey] = idcar; }
    			   			else if(PlayerInfo[giveplayerid][pPcarkey2] == -1) { PlayerInfo[giveplayerid][pPcarkey2] = idcar; }
    					    else { return 1; }
    						CarInfo[idcar][cOwned] = 1;
    						GetPlayerName(giveplayerid, sendername, sizeof(sendername));
    						strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
    						SavePlayerData(giveplayerid);
    						OnCarUpdate();
    						format(string,128, " Personal car set to %s",sendername);
    						SendClientMessage(playerid, COLOR_GREEN, string);
    					}
    				}
    				else SendClientMessage(playerid, COLOR_GREY, "   ERROR. That car is not a ownable car");
    			}
    			else SendClientMessage(playerid, COLOR_GREY, "  You must be in ownable vehicle to set a personal car");
    		}
    		else return 1;
    	}
    si am adaugat la comanda asta
    if(CarInfo[idcar][cOwned] == 0)
    					{
    						CarInfo[idcar][cOwned] = 1;
    					} 
    
    
    si 
    
    GetPlayerName(giveplayerid, sendername, sizeof(sendername));
    			format(string, 128, "  Masina este a acum a lui %s ", CarInfo[idcar][cOwner], sendername);
    			SendClientMessage(playerid,COLOR_GREEN, string);
    			strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
    			SavePlayerData(giveplayerid);
    			OnCarUpdate();

  5. am si au comanda asta /vcreatecar dar, as vrea ca atunci cand ai deja o masina sa nu mai mearga sa creezi inca una, am adaugat

    if(PlayerInfo[playerid][pPcarkey] != -1)
    	        {
             SendClientMessage(playerid, COLOR_GREY, " Ai deja o masina!! (/donatie).");
    	    }
    la /vcreatecar dar merge sa creeze masina.... chiar daca ii apare mesajul uitati comanda
    	if(strcmp(cmd, "/vcreatecar", true) == 0)
    	{
    	    if(PlayerInfo[playerid][pAdmin] == 1339)
    	    {
    	     if(PlayerInfo[playerid][pPcarkey] != -1)
    	        {
             SendClientMessage(playerid, COLOR_GREY, " Numai donatorii pot folosi aceasta comanda (/donatie).");
    	    }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /vcreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new car;
    			car = strval(tmp);
    			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, " Vehicle Number can't be below 400 or above 611 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /vcreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color1;
    			color1 = strval(tmp);
    			if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /vcreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color2;
    			color2 = strval(tmp);
    			if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
                new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
    			CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
    			CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
    			PutPlayerInVehicle(playerid,thiscar,0);
    			strmid(CarInfo[vehid][cOwner], "No-one", 0, strlen("No-one"), 999);
    			format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    			format(string, sizeof(string), "The car %s [%d] has been created",CarInfo[thiscar][cDescription],thiscar);
    			SendClientMessage(playerid, COLOR_BLUE, string);
    			ShowPlayerDialog(playerid,DIALOGIDSETOWNER,DIALOG_STYLE_INPUT,"{E0941B}Vehicle owner","Write playerid/PartOfName \nto make owner this car:","Enter","Close");
    		}
    		else
    		{
    		    SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
    			return 1;
    		}
    	}

  6. deci am un sistem de masini personale... cand dau /dealervehicle pun idu .. pretul imi apare masina... intru in masina dau /buy ... mi se respawneaza masina... totul e bine,,,, dar cand dau /restart ma duc la masina si cand urc in ea imi apare sa cumpar o masina din nou ... acelas dealership... ajutor va rog

    enum vDealerData
    {
    	vModel,
    	Float:vX,
    	Float:vY,
    	Float:vZ,
    	Float:vRot,
    	vForSale,
    	vPrice,
    	Text3D:vLabel,
    	vID,
    	vSQL_ID
    };
    
    enum pDealerData
    {
    	pCarModel,
    	Float:pCarX,
    	Float:pCarY,
    	Float:pCarZ,
    	Float:pCarRot,
    	pCarColor1,
    	pCarColor2,
    	pCarPaintjob,
    	pCarMod1,
    	pCarMod2,
    	pCarMod3,
    	pCarMod4,
    	pCarMod5,
    	pCarMod6,
    	pCarMod7,
    	pCarMod8,
    	pCarMod9,
    	pCarMod10,
    	pCarMod11,
    	pCarMod12,
    	pCarMod13,
    	pCarMod14,
    	pCarMod15,
    	pCarMod16,
    	pCarMod17,
    	pCarHasLock,
    	pCarLocked,
    	pCarTrunkCash,
    	pCarTrunkGun1,
    	pCarTrunkGun2,
    	pCarTrunkGun3,
    	pCarTrunkGun4,
    	pCarTrunkAmmo1,
    	pCarTrunkAmmo2,
    	pCarTrunkAmmo3,
    	pCarTrunkAmmo4,
    	pCarSpawned,
    	pCarOwned,
    	pCarID
    };
    new PlayerVehicles[MAX_PLAYERS][MAX_PLAYER_CARS + 1][pDealerData];
    new DealershipVehicles[MAX_VEHICLES][vDealerData];
    new VehicleLocked[MAX_VEHICLES];
    new VehicleListitem[MAX_PLAYERS][MAX_PLAYER_CARS + 1];
    new DB:VehicleDatabase[MAX_PLAYERS];
    new DB:DealerVehicleDatabase;
    new dealershipCars;
    stock PlayerName(playerid, bool:show_underscore = true)
    {
    	new pName[24];
    	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    	if (show_underscore == false)
    	{
    		for (new i = 0; i < strlen(pName); i += 1)
    		{
    		    if (pName[i] == '_') pName[i] = ' ';
    		}
    	}
    	return pName;
    }
    
    stock sscanf(string[], format[], {Float,_}:...)
    {
    	#if defined isnull
    		if (isnull(string))
    	#else
    		if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
    	#endif
    		{
    			return format[0];
    		}
    	#pragma tabsize 4
    	new
    		formatPos = 0,
    		stringPos = 0,
    		paramPos = 2,
    		paramCount = numargs(),
    		delim = ' ';
    	while (string[stringPos] && string[stringPos] <= ' ')
    	{
    		stringPos++;
    	}
    	while (paramPos < paramCount && string[stringPos])
    	{
    		switch (format[formatPos++])
    		{
    			case '\0':
    			{
    				return 0;
    			}
    			case 'i', 'd':
    			{
    				new
    					neg = 1,
    					num = 0,
    					ch = string[stringPos];
    				if (ch == '-')
    				{
    					neg = -1;
    					ch = string[++stringPos];
    				}
    				do
    				{
    					stringPos++;
    					if ('0' <= ch <= '9')
    					{
    						num = (num * 10) + (ch - '0');
    					}
    					else
    					{
    						return -1;
    					}
    				}
    				while ((ch = string[stringPos]) > ' ' && ch != delim);
    				setarg(paramPos, 0, num * neg);
    			}
    			case 'h', 'x':
    			{
    				new
    					num = 0,
    					ch = string[stringPos];
    				do
    				{
    					stringPos++;
    					switch (ch)
    					{
    						case 'x', 'X':
    						{
    							num = 0;
    							continue;
    						}
    						case '0' .. '9':
    						{
    							num = (num << 4) | (ch - '0');
    						}
    						case 'a' .. 'f':
    						{
    							num = (num << 4) | (ch - ('a' - 10));
    						}
    						case 'A' .. 'F':
    						{
    							num = (num << 4) | (ch - ('A' - 10));
    						}
    						default:
    						{
    							return -1;
    						}
    					}
    				}
    				while ((ch = string[stringPos]) > ' ' && ch != delim);
    				setarg(paramPos, 0, num);
    			}
    			case 'c':
    			{
    				setarg(paramPos, 0, string[stringPos++]);
    			}
    			case 'f':
    			{
    
    				new changestr[16], changepos = 0, strpos = stringPos;
    				while(changepos < 16 && string[strpos] && string[strpos] != delim)
    				{
    					changestr[changepos++] = string[strpos++];
        				}
    				changestr[changepos] = '\0';
    				setarg(paramPos,0,_:floatstr(changestr));
    			}
    			case 'p':
    			{
    				delim = format[formatPos++];
    				continue;
    			}
    			case '\'':
    			{
    				new
    					end = formatPos - 1,
    					ch;
    				while ((ch = format[++end]) && ch != '\'') {}
    				if (!ch)
    				{
    					return -1;
    				}
    				format[end] = '\0';
    				if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
    				{
    					if (format[end + 1])
    					{
    						return -1;
    					}
    					return 0;
    				}
    				format[end] = '\'';
    				stringPos = ch + (end - formatPos);
    				formatPos = end + 1;
    			}
    			case 'u':
    			{
    				new
    					end = stringPos - 1,
    					id = 0,
    					bool:num = true,
    					ch;
    				while ((ch = string[++end]) && ch != delim)
    				{
    					if (num)
    					{
    						if ('0' <= ch <= '9')
    						{
    							id = (id * 10) + (ch - '0');
    						}
    						else
    						{
    							num = false;
    						}
    					}
    				}
    				if (num && IsPlayerConnected(id))
    				{
    					setarg(paramPos, 0, id);
    				}
    				else
    				{
    					#if !defined foreach
    						#define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
    						#define __SSCANF_FOREACH__
    					#endif
    					string[end] = '\0';
    					num = false;
    					new
    						name[MAX_PLAYER_NAME];
    					id = end - stringPos;
    					foreach (Player, playerid)
    					{
    						GetPlayerName(playerid, name, sizeof (name));
    						if (!strcmp(name, string[stringPos], true, id))
    						{
    							setarg(paramPos, 0, playerid);
    							num = true;
    							break;
    						}
    					}
    					if (!num)
    					{
    						setarg(paramPos, 0, INVALID_PLAYER_ID);
    					}
    					string[end] = ch;
    					#if defined __SSCANF_FOREACH__
    						#undef foreach
    						#undef __SSCANF_FOREACH__
    					#endif
    				}
    				stringPos = end;
    			}
    			case 's', 'z':
    			{
    				new
    					i = 0,
    					ch;
    				if (format[formatPos])
    				{
    					while ((ch = string[stringPos++]) && ch != delim)
    					{
    						setarg(paramPos, i++, ch);
    					}
    					if (!i)
    					{
    						return -1;
    					}
    				}
    				else
    				{
    					while ((ch = string[stringPos++]))
    					{
    						setarg(paramPos, i++, ch);
    					}
    				}
    				stringPos--;
    				setarg(paramPos, i, '\0');
    			}
    			default:
    			{
    				continue;
    			}
    		}
    		while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
    		{
    			stringPos++;
    		}
    		while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
    		{
    			stringPos++;
    		}
    		paramPos++;
    	}
    	do
    	{
    		if ((delim = format[formatPos++]) > ' ')
    		{
    			if (delim == '\'')
    			{
    				while ((delim = format[formatPos++]) && delim != '\'') {}
    			}
    			else if (delim != 'z')
    			{
    				return delim;
    			}
    		}
    	}
    	while (delim > ' ');
    	return 0;
    }
    
    stock DB_Escape(text[])
    {
        new
            ret[80 * 2],
            ch,
            i,
            j;
        while ((ch = text[i++]) && j < sizeof (ret))
        {
            if (ch == '\'')
            {
                if (j < sizeof (ret) - 2)
                {
                    ret[j++] = '\'';
                    ret[j++] = '\'';
                }
            }
            else if (j < sizeof (ret))
            {
                ret[j++] = ch;
            }
            else
            {
                j++;
            }
        }
        ret[sizeof (ret) - 1] = '\0';
        return ret;
    }
    
    stock ReturnComponentSlot(componentid)
    {
    	new i = 0;
    	for(i = 0; i < 20; i ++) { if(spoiler[i][0] == componentid) { return 1; } }
    	for(i = 0; i < 3; i ++) { if(nitro[i][0] == componentid) { return 2; } }
    	for(i = 0; i < 23; i ++) { if(front_bumper[i][0] == componentid) { return 3; } }
    	for(i = 0; i < 22; i ++) { if(rear_bumper[i][0] == componentid) { return 4; } }
    	for(i = 0; i < 28; i ++) { if(exhaust[i][0] == componentid) { return 5; } }
    	for(i = 0; i < 2; i ++) { if(bventr[i][0] == componentid) { return 6; } }
    	for(i = 0; i < 2; i ++) { if(bventl[i][0] == componentid) { return 7; } }
    	for(i = 0; i < 4; i ++) { if(bscoop[i][0] == componentid) { return 8; } }
    	for(i = 0; i < 13; i ++) { if(rscoop[i][0] == componentid) { return 9; } }
    	for(i = 0; i < 21; i ++) { if(left_sideskirt[i][0] == componentid) { return 10; } }
    	for(i = 0; i < 21; i ++) { if(right_sideskirt[i][0] == componentid) { return 11; } }
    	if(hydraulics[0][0] == componentid) { return 12; }
    	if(bass[0][0] == componentid) { return 13; }
    	for(i = 0; i < 2; i ++) { if(rbbars[i][0] == componentid) { return 14; } }
    	for(i = 0; i < 2; i ++) { if(fbbars[i][0] == componentid) { return 15; } }
    	for(i = 0; i < 17; i ++) { if(wheels[i][0] == componentid) { return 16; } }
    	for(i = 0; i < 2; i ++) { if(lights[i][0] == componentid) { return 17; } }
    	return 0;
    }
    stock CreateVehicleTables(playerid)
    {
    	if (IsPlayerConnected(playerid))
    	{
    	    new query[1536];
         	format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `VEHICLES` ");
    	    strcat(query, "(`Name`, `Model`, `X`, `Y`, `Z`, `Rot`, `Color1`, `Color2`, `Paintjob`, `Mod1`, `Mod2`, `Mod3`, ");
    	    strcat(query, "`Mod4`, `Mod5`, `Mod6`, `Mod7`, `Mod8`, `Mod9`, `Mod10`, `Mod11`, `Mod12`, `Mod13`, ");
    	    strcat(query, "`Mod14`, `Mod15`, `Mod16`, `Mod17`, `HasLock`, `Locked`, `TrunkCash`, ");
    	    strcat(query, "`TrunkGun1`, `TrunkGun2`, `TrunkGun3`, `TrunkGun4`, `TrunkAmmo1`, `TrunkAmmo2`, `TrunkAmmo3`, ");
    		strcat(query, "`TrunkAmmo4`, `Spawned`, `Owned`, `Slot`)");
    		db_query(VehicleDatabase[playerid], query);
    	}
    	return 1;
    }
    
    stock DeleteDealershipVehicle(vehicleid)
    {
    	new query[128];
    	if (DealershipVehicles[vehicleid][vForSale])
    	{
    		format(query, sizeof(query), "DELETE FROM `DEALERCARS` WHERE `vID` = '%d'", DealershipVehicles[vehicleid][vSQL_ID]);
    		db_query(DealerVehicleDatabase, query);
            DealershipVehicles[vehicleid][vModel] = 0;
    		DealershipVehicles[vehicleid][vX] = 0.0;
    		DealershipVehicles[vehicleid][vY] = 0.0;
    		DealershipVehicles[vehicleid][vZ] = 0.0;
    		DealershipVehicles[vehicleid][vRot] = 0.0;
    		DealershipVehicles[vehicleid][vForSale] = 0;
    		DealershipVehicles[vehicleid][vPrice] = 0;
    		Delete3DTextLabel(DealershipVehicles[vehicleid][vLabel]);
    		DestroyVehicle(DealershipVehicles[vehicleid][vID]);
    		DealershipVehicles[vehicleid][vID] = 0;
    		DealershipVehicles[vehicleid][vSQL_ID] = 0;
    		dealershipCars -= 1;
    		return 1;
    	}
    	return 0;
    }
    
    stock DeletePlayerVehicle(playerid, slot)
    {
    	new query[128];
    	if (PlayerVehicles[playerid][slot][pCarOwned])
    	{
    		format(query, sizeof(query), "DELETE FROM `VEHICLES` WHERE `Name` = '%s' AND `Slot` = '%d'", PlayerName(playerid), slot);
    		db_query(VehicleDatabase[playerid], query);
    		PlayerVehicles[playerid][slot][pCarModel] = 0;
    		PlayerVehicles[playerid][slot][pCarX] = 0.0;
    		PlayerVehicles[playerid][slot][pCarY] = 0.0;
    		PlayerVehicles[playerid][slot][pCarZ] = 0.0;
    		PlayerVehicles[playerid][slot][pCarRot] = 0.0;
    		PlayerVehicles[playerid][slot][pCarColor1] = 0;
    		PlayerVehicles[playerid][slot][pCarColor2] = 0;
    		PlayerVehicles[playerid][slot][pCarPaintjob] = -1;
    		PlayerVehicles[playerid][slot][pCarMod1] = 0;
    		PlayerVehicles[playerid][slot][pCarMod2] = 0;
    		PlayerVehicles[playerid][slot][pCarMod3] = 0;
    		PlayerVehicles[playerid][slot][pCarMod4] = 0;
    		PlayerVehicles[playerid][slot][pCarMod5] = 0;
    		PlayerVehicles[playerid][slot][pCarMod6] = 0;
    		PlayerVehicles[playerid][slot][pCarMod7] = 0;
    		PlayerVehicles[playerid][slot][pCarMod8] = 0;
    		PlayerVehicles[playerid][slot][pCarMod9] = 0;
    		PlayerVehicles[playerid][slot][pCarMod10] = 0;
    		PlayerVehicles[playerid][slot][pCarMod11] = 0;
    		PlayerVehicles[playerid][slot][pCarMod12] = 0;
    		PlayerVehicles[playerid][slot][pCarMod13] = 0;
    		PlayerVehicles[playerid][slot][pCarMod14] = 0;
    		PlayerVehicles[playerid][slot][pCarMod15] = 0;
    		PlayerVehicles[playerid][slot][pCarMod16] = 0;
    		PlayerVehicles[playerid][slot][pCarMod17] = 0;
    		PlayerVehicles[playerid][slot][pCarHasLock] = 0;
    		PlayerVehicles[playerid][slot][pCarLocked] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkCash] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkGun1] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkGun2] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkGun3] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkGun4] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo1] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo2] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo3] = 0;
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo4] = 0;
    		PlayerVehicles[playerid][slot][pCarSpawned] = 0;
    		PlayerVehicles[playerid][slot][pCarOwned] = 0;
    		if (PlayerVehicles[playerid][slot][pCarID] != 0)
    		{
    		    UnlockVehicle(PlayerVehicles[playerid][slot][pCarID]);
    			DestroyVehicle(PlayerVehicles[playerid][slot][pCarID]);
    			PlayerVehicles[playerid][slot][pCarID] = 0;
    		}
    		return 1;
    	}
    	return 0;
    }
    
    stock CreateDealershipVehicle(model, price, Float:x, Float:y, Float:z, Float:rotation)
    {
    	if (model < 400 || model > 611)
    		return 0;
    
    	new
    	    vehicleid,
    	    string[256],
    		query[1536];
    	    
    	vehicleid = CreateVehicle(model, x, y, z, rotation, 1, 1, 5);
    	if (vehicleid == INVALID_VEHICLE_ID)
    	    return 0;
    	    
        DealershipVehicles[vehicleid][vModel] = model;
    	DealershipVehicles[vehicleid][vX] = x;
    	DealershipVehicles[vehicleid][vY] = y;
    	DealershipVehicles[vehicleid][vZ] = z;
    	DealershipVehicles[vehicleid][vRot] = rotation;
    	DealershipVehicles[vehicleid][vForSale] = 1;
    	DealershipVehicles[vehicleid][vPrice] = price;
    	DealershipVehicles[vehicleid][vID] = vehicleid;
    	DealershipVehicles[vehicleid][vSQL_ID] = dealershipCars + 1;
    	format(string, sizeof(string), "This {FFFFFF}%s {F5DEB3}is for sale.\nThe cost of this vehicle is {FFFFFF}$%d.\n{F5DEB3}For more information, enter the vehicle.", GetVehicleName(vehicleid), price);
    	DealershipVehicles[vehicleid][vLabel] = Create3DTextLabel(string, YELLOW2, x, y, z, 10.0, 0);
    	dealershipCars += 1;
    
    	format(query, sizeof(query), "INSERT INTO `DEALERCARS` (`vID`, `vModel`, `vX`, `vY`, `vZ`, `vRot`, `vForSale`, `vPrice`) VALUES('%d', '%d', '%f', '%f', '%f', '%f', '%d', '%d')", dealershipCars, model, x, y, z, rotation, 1, price);
    	db_query(DealerVehicleDatabase, query);
    	return vehicleid;
    }
    
    stock CreatePlayerVehicle(playerid, model, Float:x, Float:y, Float:z, Float:rotation)
    {
    	new slot = -1;
    	for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
    	{
    		if (PlayerVehicles[playerid][i][pCarOwned] == 0)
    		{
    			slot = i;
    			break;
    		}
    	}
    	if (slot == -1) return 0;
    	new vehicleid = CreateVehicle(model, x, y, z, rotation, 1, 1, -1);
    	if (vehicleid == INVALID_VEHICLE_ID) return -1;
        PlayerVehicles[playerid][slot][pCarModel] = model;
    	PlayerVehicles[playerid][slot][pCarX] = x;
    	PlayerVehicles[playerid][slot][pCarY] = y;
    	PlayerVehicles[playerid][slot][pCarZ] = z;
    	PlayerVehicles[playerid][slot][pCarRot] = rotation;
    	PlayerVehicles[playerid][slot][pCarColor1] = 1;
    	PlayerVehicles[playerid][slot][pCarColor2] = 1;
    	PlayerVehicles[playerid][slot][pCarPaintjob] = -1;
    	PlayerVehicles[playerid][slot][pCarMod1] = 0;
    	PlayerVehicles[playerid][slot][pCarMod2] = 0;
    	PlayerVehicles[playerid][slot][pCarMod3] = 0;
    	PlayerVehicles[playerid][slot][pCarMod4] = 0;
    	PlayerVehicles[playerid][slot][pCarMod5] = 0;
    	PlayerVehicles[playerid][slot][pCarMod6] = 0;
    	PlayerVehicles[playerid][slot][pCarMod7] = 0;
    	PlayerVehicles[playerid][slot][pCarMod8] = 0;
    	PlayerVehicles[playerid][slot][pCarMod9] = 0;
    	PlayerVehicles[playerid][slot][pCarMod10] = 0;
    	PlayerVehicles[playerid][slot][pCarMod11] = 0;
    	PlayerVehicles[playerid][slot][pCarMod12] = 0;
    	PlayerVehicles[playerid][slot][pCarMod13] = 0;
    	PlayerVehicles[playerid][slot][pCarMod14] = 0;
    	PlayerVehicles[playerid][slot][pCarMod15] = 0;
    	PlayerVehicles[playerid][slot][pCarMod16] = 0;
    	PlayerVehicles[playerid][slot][pCarMod17] = 0;
    	PlayerVehicles[playerid][slot][pCarHasLock] = 0;
    	PlayerVehicles[playerid][slot][pCarLocked] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkCash] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkGun1] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkGun2] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkGun3] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkGun4] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkAmmo1] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkAmmo2] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkAmmo3] = 0;
    	PlayerVehicles[playerid][slot][pCarTrunkAmmo4] = 0;
    	PlayerVehicles[playerid][slot][pCarSpawned] = 1;
    	PlayerVehicles[playerid][slot][pCarOwned] = 1;
    	PlayerVehicles[playerid][slot][pCarID] = vehicleid;
    
    	new query[1536], query2[1536];
    	format(query, sizeof(query), "INSERT INTO `VEHICLES` ");
    	strcat(query, "(`Name`, `Model`, `X`, `Y`, `Z`, `Rot`, `Color1`, `Color2`, `Paintjob`, `Mod1`, `Mod2`, `Mod3`, ");
     	strcat(query, "`Mod4`, `Mod5`, `Mod6`, `Mod7`, `Mod8`, `Mod9`, `Mod10`, `Mod11`, `Mod12`, `Mod13`, ");
     	strcat(query, "`Mod14`, `Mod15`, `Mod16`, `Mod17`, `HasLock`, `Locked`, `TrunkCash`, ");
     	strcat(query, "`TrunkGun1`, `TrunkGun2`, `TrunkGun3`, `TrunkGun4`, `TrunkAmmo1`, `TrunkAmmo2`, `TrunkAmmo3`, ");
    	strcat(query, "`TrunkAmmo4`, `Spawned`, `Owned`, `Slot`) ");
    
    	format(query2, sizeof(query2), "VALUES('%s', '%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
    	    DB_Escape(PlayerName(playerid)),
            PlayerVehicles[playerid][slot][pCarModel],
    		PlayerVehicles[playerid][slot][pCarX],
    		PlayerVehicles[playerid][slot][pCarY],
    		PlayerVehicles[playerid][slot][pCarZ],
    		PlayerVehicles[playerid][slot][pCarRot],
    		PlayerVehicles[playerid][slot][pCarColor1],
    		PlayerVehicles[playerid][slot][pCarColor2],
    		PlayerVehicles[playerid][slot][pCarPaintjob],
    		PlayerVehicles[playerid][slot][pCarMod1],
    		PlayerVehicles[playerid][slot][pCarMod2],
    		PlayerVehicles[playerid][slot][pCarMod3],
    		PlayerVehicles[playerid][slot][pCarMod4],
    		PlayerVehicles[playerid][slot][pCarMod5],
    		PlayerVehicles[playerid][slot][pCarMod6],
    		PlayerVehicles[playerid][slot][pCarMod7],
    		PlayerVehicles[playerid][slot][pCarMod8],
    		PlayerVehicles[playerid][slot][pCarMod9],
    		PlayerVehicles[playerid][slot][pCarMod10],
    		PlayerVehicles[playerid][slot][pCarMod11],
    		PlayerVehicles[playerid][slot][pCarMod12],
    		PlayerVehicles[playerid][slot][pCarMod13],
    		PlayerVehicles[playerid][slot][pCarMod14],
    		PlayerVehicles[playerid][slot][pCarMod15],
    		PlayerVehicles[playerid][slot][pCarMod16],
    		PlayerVehicles[playerid][slot][pCarMod17],
    		PlayerVehicles[playerid][slot][pCarHasLock],
    		PlayerVehicles[playerid][slot][pCarLocked],
    		PlayerVehicles[playerid][slot][pCarTrunkCash],
    		PlayerVehicles[playerid][slot][pCarTrunkGun1],
    		PlayerVehicles[playerid][slot][pCarTrunkGun2],
    		PlayerVehicles[playerid][slot][pCarTrunkGun3],
    		PlayerVehicles[playerid][slot][pCarTrunkGun4],
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo1],
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo2],
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo3],
    		PlayerVehicles[playerid][slot][pCarTrunkAmmo4],
    		PlayerVehicles[playerid][slot][pCarSpawned],
    		PlayerVehicles[playerid][slot][pCarOwned],
    		slot);
    	strcat(query, query2);
    	db_query(VehicleDatabase[playerid], query);
    	SavePlayerVehicle(playerid, slot);
    	return 1;
    }
    
    stock SavePlayerVehicle(playerid, slot)
    {
    	if (PlayerVehicles[playerid][slot][pCarOwned])
    	{
            new query[1536], query2[1536];
     		format(query, sizeof(query), "UPDATE `VEHICLES` SET ");
    		format(query2, sizeof(query2), "Name = '%s', Model = '%d', X = '%f', Y = '%f', Z = '%f', Rot = '%f', Color1 = '%d', Color2 = '%d', Paintjob = '%d', Mod1 = '%d', Mod2 = '%d', Mod3 = '%d', ",
    		    DB_Escape(PlayerName(playerid)),
    		    PlayerVehicles[playerid][slot][pCarModel],
    		    PlayerVehicles[playerid][slot][pCarX],
    		    PlayerVehicles[playerid][slot][pCarY],
    		    PlayerVehicles[playerid][slot][pCarZ],
    		    PlayerVehicles[playerid][slot][pCarRot],
    		    PlayerVehicles[playerid][slot][pCarColor1],
    		    PlayerVehicles[playerid][slot][pCarColor2],
    		    PlayerVehicles[playerid][slot][pCarPaintjob],
    		    PlayerVehicles[playerid][slot][pCarMod1],
    		    PlayerVehicles[playerid][slot][pCarMod2],
    		    PlayerVehicles[playerid][slot][pCarMod3]);
    		strcat(query, query2);
    
    		format(query2, sizeof(query2), "Mod4 = '%d', Mod5 = '%d', Mod6 = '%d', Mod7 = '%d', Mod8 = '%d', Mod9 = '%d', Mod10 = '%d', Mod11 = '%d', Mod12 = '%d', Mod13 = '%d', Mod14 = '%d', Mod15 = '%d', ",
                PlayerVehicles[playerid][slot][pCarMod4],
    		    PlayerVehicles[playerid][slot][pCarMod5],
    		    PlayerVehicles[playerid][slot][pCarMod6],
    		    PlayerVehicles[playerid][slot][pCarMod7],
    		    PlayerVehicles[playerid][slot][pCarMod8],
    		    PlayerVehicles[playerid][slot][pCarMod9],
    		    PlayerVehicles[playerid][slot][pCarMod10],
    		    PlayerVehicles[playerid][slot][pCarMod11],
    		    PlayerVehicles[playerid][slot][pCarMod12],
    		    PlayerVehicles[playerid][slot][pCarMod13],
    		    PlayerVehicles[playerid][slot][pCarMod14],
    		    PlayerVehicles[playerid][slot][pCarMod15]);
            strcat(query, query2);
    
    		format(query2, sizeof(query2), "Mod16 = '%d', Mod17 = '%d', HasLock = '%d', Locked = '%d', TrunkCash = '%d', TrunkGun1 = '%d', TrunkGun2 = '%d', TrunkGun3 = '%d', TrunkGun4 = '%d', TrunkAmmo1 = '%d', TrunkAmmo2 = '%d', TrunkAmmo3 = '%d', ",
    			PlayerVehicles[playerid][slot][pCarMod16],
       			PlayerVehicles[playerid][slot][pCarMod17],
    		    PlayerVehicles[playerid][slot][pCarHasLock],
    		    PlayerVehicles[playerid][slot][pCarLocked],
    		    PlayerVehicles[playerid][slot][pCarTrunkCash],
    		    PlayerVehicles[playerid][slot][pCarTrunkGun1],
    		    PlayerVehicles[playerid][slot][pCarTrunkGun2],
    		    PlayerVehicles[playerid][slot][pCarTrunkGun3],
    		    PlayerVehicles[playerid][slot][pCarTrunkGun4],
    		    PlayerVehicles[playerid][slot][pCarTrunkAmmo1],
    		    PlayerVehicles[playerid][slot][pCarTrunkAmmo2],
    		    PlayerVehicles[playerid][slot][pCarTrunkAmmo3]);
    		strcat(query, query2);
    
    		format(query2, sizeof(query2), "TrunkAmmo4 = '%d', Spawned = '%d', Owned = '%d', Slot = '%d' WHERE Name = '%s' AND Slot = '%d'",
    			PlayerVehicles[playerid][slot][pCarTrunkAmmo4],
    		    PlayerVehicles[playerid][slot][pCarSpawned],
    		    PlayerVehicles[playerid][slot][pCarOwned],
    		    slot,
    			DB_Escape(PlayerName(playerid)),
    			slot);
    	    strcat(query, query2);
    		db_query(VehicleDatabase[playerid], query);
    	}
    	return 1;
    }
    
    stock LoadPlayerVehicles(playerid)
    {
    	new DBResult:result;
    	new query[192], field[64];
    	for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
    	{
    		format(query, sizeof(query), "SELECT * FROM `VEHICLES` WHERE `Name` = '%s' COLLATE NOCASE AND `Slot` = '%d'", PlayerName(playerid), i);
    		result = db_query(VehicleDatabase[playerid], query);
    		if (db_num_rows(result))
    		{
                db_get_field_assoc(result, "Model", field, sizeof(field)); PlayerVehicles[playerid][i][pCarModel] = strval(field);
    			db_get_field_assoc(result, "X", field, sizeof(field)); PlayerVehicles[playerid][i][pCarX] = floatstr(field);
    			db_get_field_assoc(result, "Y", field, sizeof(field)); PlayerVehicles[playerid][i][pCarY] = floatstr(field);
    			db_get_field_assoc(result, "Z", field, sizeof(field)); PlayerVehicles[playerid][i][pCarZ] = floatstr(field);
    			db_get_field_assoc(result, "Rot", field, sizeof(field)); PlayerVehicles[playerid][i][pCarRot] = floatstr(field);
    			db_get_field_assoc(result, "Color1", field, sizeof(field)); PlayerVehicles[playerid][i][pCarColor1] = strval(field);
    			db_get_field_assoc(result, "Color2", field, sizeof(field)); PlayerVehicles[playerid][i][pCarColor2] = strval(field);
    			db_get_field_assoc(result, "Paintjob", field, sizeof(field)); PlayerVehicles[playerid][i][pCarPaintjob] = strval(field);
    			db_get_field_assoc(result, "Mod1", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod1] = strval(field);
    			db_get_field_assoc(result, "Mod2", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod2] = strval(field);
    			db_get_field_assoc(result, "Mod3", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod3] = strval(field);
    			db_get_field_assoc(result, "Mod4", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod4] = strval(field);
    			db_get_field_assoc(result, "Mod5", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod5] = strval(field);
    			db_get_field_assoc(result, "Mod6", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod6] = strval(field);
    			db_get_field_assoc(result, "Mod7", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod7] = strval(field);
    			db_get_field_assoc(result, "Mod8", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod8] = strval(field);
    			db_get_field_assoc(result, "Mod9", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod9] = strval(field);
    			db_get_field_assoc(result, "Mod10", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod10] = strval(field);
    			db_get_field_assoc(result, "Mod11", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod11] = strval(field);
    			db_get_field_assoc(result, "Mod12", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod12] = strval(field);
    			db_get_field_assoc(result, "Mod13", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod13] = strval(field);
    			db_get_field_assoc(result, "Mod14", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod14] = strval(field);
    			db_get_field_assoc(result, "Mod15", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod15] = strval(field);
    			db_get_field_assoc(result, "Mod16", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod16] = strval(field);
    			db_get_field_assoc(result, "Mod17", field, sizeof(field)); PlayerVehicles[playerid][i][pCarMod17] = strval(field);
    			db_get_field_assoc(result, "HasLock", field, sizeof(field)); PlayerVehicles[playerid][i][pCarHasLock] = strval(field);
    			db_get_field_assoc(result, "Locked", field, sizeof(field)); PlayerVehicles[playerid][i][pCarLocked] = strval(field);
    			db_get_field_assoc(result, "TrunkCash", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkCash] = strval(field);
    			db_get_field_assoc(result, "TrunkGun1", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkGun1] = strval(field);
    			db_get_field_assoc(result, "TrunkGun2", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkGun2] = strval(field);
    			db_get_field_assoc(result, "TrunkGun3", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkGun3] = strval(field);
    			db_get_field_assoc(result, "TrunkGun4", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkGun4] = strval(field);
    			db_get_field_assoc(result, "TrunkAmmo1", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkAmmo1] = strval(field);
    			db_get_field_assoc(result, "TrunkAmmo2", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkAmmo2] = strval(field);
    			db_get_field_assoc(result, "TrunkAmmo3", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkAmmo3] = strval(field);
    			db_get_field_assoc(result, "TrunkAmmo4", field, sizeof(field)); PlayerVehicles[playerid][i][pCarTrunkAmmo4] = strval(field);
    			db_get_field_assoc(result, "Spawned", field, sizeof(field)); PlayerVehicles[playerid][i][pCarSpawned] = strval(field);
    			db_get_field_assoc(result, "Owned", field, sizeof(field)); PlayerVehicles[playerid][i][pCarOwned] = strval(field);
    		}
    		if (PlayerVehicles[playerid][i][pCarOwned])
    		{
    		    if (PlayerVehicles[playerid][i][pCarSpawned])
    		    {
    		    	PlayerVehicles[playerid][i][pCarID] = CreateVehicle(PlayerVehicles[playerid][i][pCarModel], PlayerVehicles[playerid][i][pCarX], PlayerVehicles[playerid][i][pCarY], PlayerVehicles[playerid][i][pCarZ], PlayerVehicles[playerid][i][pCarRot], PlayerVehicles[playerid][i][pCarColor1], PlayerVehicles[playerid][i][pCarColor2], -1);
    		    	ModifyVehicle(playerid, i);
    			}
    		}
    		db_free_result(result);
    	}
    	return 1;
    }
    
    stock SaveDealershipVehicles()
    {
    	new query[512], query2[512];
    	for (new i = 1; i < MAX_VEHICLES; i += 1)
    	{
    		if (!DealershipVehicles[i][vForSale]) continue;
    
    		format(query, sizeof(query), "UPDATE `DEALERCARS` SET ");
    		format(query2, sizeof(query2), "vID = '%d', vModel = '%d', vX = '%f', vY = '%f', vZ = '%f', vRot = '%f', vForSale = '%d', vPrice = '%d' WHERE `vID` = '%d'",
    		    DealershipVehicles[i][vSQL_ID],
    			DealershipVehicles[i][vModel],
    			DealershipVehicles[i][vX],
    			DealershipVehicles[i][vY],
    			DealershipVehicles[i][vZ],
    			DealershipVehicles[i][vRot],
    			DealershipVehicles[i][vForSale],
    			DealershipVehicles[i][vPrice],
    			DealershipVehicles[i][vSQL_ID]);
    		    
    		strcat(query, query2);
    		db_query(DealerVehicleDatabase, query);
    	}
    	return 1;
    }
    
    stock LoadDealershipVehicles()
    {
    	new DBResult:result;
        new query[128], field[64], string[256];
    	for (new i = 1; i < MAX_VEHICLES; i += 1)
    	{
    	    format(query, sizeof(query), "SELECT * FROM `DEALERCARS` WHERE vID = '%d'", i);
    		result = db_query(DealerVehicleDatabase, query);
    		if (db_num_rows(result))
    		{
    		    new model, Float:x, Float:y, Float:z, Float:rot, forsale, price, vehicleid;
    			db_get_field_assoc(result, "vModel", field, sizeof(field)); model = strval(field);
    			db_get_field_assoc(result, "vX", field, sizeof(field)); x = strval(field);
    			db_get_field_assoc(result, "vY", field, sizeof(field)); y = strval(field);
    			db_get_field_assoc(result, "vZ", field, sizeof(field)); z = strval(field);
    			db_get_field_assoc(result, "vRot", field, sizeof(field)); rot = strval(field);
    			db_get_field_assoc(result, "vForSale", field, sizeof(field)); forsale = strval(field);
    			db_get_field_assoc(result, "vPrice", field, sizeof(field)); price = strval(field);
    			vehicleid = CreateVehicle(model, x, y, z, rot, 1, 1, 5);
    
    			DealershipVehicles[vehicleid][vModel] = model;
    			DealershipVehicles[vehicleid][vX] = x;
    			DealershipVehicles[vehicleid][vY] = y;
    			DealershipVehicles[vehicleid][vZ] = z;
    			DealershipVehicles[vehicleid][vRot] = rot;
    			DealershipVehicles[vehicleid][vForSale] = forsale;
    			DealershipVehicles[vehicleid][vPrice] = price;
    			DealershipVehicles[vehicleid][vID] = vehicleid;
    			format(string, sizeof(string), "This {FFFFFF}%s {F5DEB3}is for sale.\nThe cost of this vehicle is {FFFFFF}$%d.\n{F5DEB3}For more information, enter the vehicle.", GetVehicleName(vehicleid), price);
    			DealershipVehicles[vehicleid][vLabel] = Create3DTextLabel(string, YELLOW2, x, y, z, 10.0, 0);
    			DealershipVehicles[vehicleid][vSQL_ID] = dealershipCars + 1;
    			dealershipCars += 1;
    		}
    		db_free_result(result);
    	}
    	return 1;
    }
    
    stock ModifyVehicle(playerid, slot)
    {
        if (!PlayerVehicles[playerid][slot][pCarOwned]) return 1;
        if (!PlayerVehicles[playerid][slot][pCarSpawned]) return 1;
        new vehicleid = PlayerVehicles[playerid][slot][pCarID];
    	new comp1 = PlayerVehicles[playerid][slot][pCarMod1];
    	new comp2 = PlayerVehicles[playerid][slot][pCarMod2];
    	new comp3 = PlayerVehicles[playerid][slot][pCarMod3];
    	new comp4 = PlayerVehicles[playerid][slot][pCarMod4];
    	new comp5 = PlayerVehicles[playerid][slot][pCarMod5];
    	new comp6 = PlayerVehicles[playerid][slot][pCarMod6];
    	new comp7 = PlayerVehicles[playerid][slot][pCarMod7];
    	new comp8 = PlayerVehicles[playerid][slot][pCarMod8];
    	new comp9 = PlayerVehicles[playerid][slot][pCarMod9];
    	new comp10 = PlayerVehicles[playerid][slot][pCarMod10];
    	new comp11 = PlayerVehicles[playerid][slot][pCarMod11];
    	new comp12 = PlayerVehicles[playerid][slot][pCarMod12];
    	new comp13 = PlayerVehicles[playerid][slot][pCarMod13];
    	new comp14 = PlayerVehicles[playerid][slot][pCarMod14];
    	new comp15 = PlayerVehicles[playerid][slot][pCarMod15];
    	new comp16 = PlayerVehicles[playerid][slot][pCarMod16];
    	new comp17 = PlayerVehicles[playerid][slot][pCarMod17];
    	new color1 = PlayerVehicles[playerid][slot][pCarColor1];
    	new color2 = PlayerVehicles[playerid][slot][pCarColor2];
    	new paintjob = PlayerVehicles[playerid][slot][pCarPaintjob];
    
    	if (comp1 != 0) AddVehicleComponent(vehicleid, comp1);
    	if (comp2 != 0) AddVehicleComponent(vehicleid, comp2);
    	if (comp3 != 0) AddVehicleComponent(vehicleid, comp3);
    	if (comp4 != 0) AddVehicleComponent(vehicleid, comp4);
    	if (comp5 != 0) AddVehicleComponent(vehicleid, comp5);
    	if (comp6 != 0) AddVehicleComponent(vehicleid, comp6);
    	if (comp7 != 0) AddVehicleComponent(vehicleid, comp7);
    	if (comp8 != 0) AddVehicleComponent(vehicleid, comp8);
    	if (comp9 != 0) AddVehicleComponent(vehicleid, comp9);
    	if (comp10 != 0) AddVehicleComponent(vehicleid, comp10);
    	if (comp11 != 0) AddVehicleComponent(vehicleid, comp11);
    	if (comp12 != 0) AddVehicleComponent(vehicleid, comp12);
    	if (comp13 != 0) AddVehicleComponent(vehicleid, comp13);
    	if (comp14 != 0) AddVehicleComponent(vehicleid, comp14);
    	if (comp15 != 0) AddVehicleComponent(vehicleid, comp15);
    	if (comp16 != 0) AddVehicleComponent(vehicleid, comp16);
    	if (comp17 != 0) AddVehicleComponent(vehicleid, comp17);
    	ChangeVehicleColor(vehicleid, color1, color2);
    	if (paintjob != -1) ChangeVehiclePaintjob(vehicleid, paintjob);
    
    	switch (PlayerVehicles[playerid][slot][pCarLocked])
    	{
    	    case 0: UnlockVehicle(PlayerVehicles[playerid][slot][pCarID]);
    	    case 1: LockVehicle(PlayerVehicles[playerid][slot][pCarID]);
    	}
    	return 1;
    }
    stock PlayerOwnsVehicle(playerid, vehicleid)
    {
        for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
        {
        	if (PlayerVehicles[playerid][i][pCarID] == vehicleid && PlayerVehicles[playerid][i][pCarSpawned]) return 1;
    	}
    	return 0;
    }
    
    stock GetPlayerVehicleSlot(playerid)
    {
    	if (IsPlayerInAnyVehicle(playerid))
    	{
    	    for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
    	    {
    	        if (PlayerVehicles[playerid][i][pCarID] == GetPlayerVehicleID(playerid) && PlayerVehicles[playerid][i][pCarSpawned])
    	        {
    	            return i;
    			}
    		}
    	}
    	return 0;
    }
    
    stock GetPlayerVehicleAmount(playerid)
    {
    	new iCars;
    	for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
    	{
    	    if (PlayerVehicles[playerid][i][pCarOwned]) ++iCars;
    	}
    	return iCars;
    }
    
    stock ParkVehicle(playerid, slot)
    {
    	if (IsPlayerInVehicle(playerid, PlayerVehicles[playerid][slot][pCarID]))
    	{
    		if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    		{
    		    new Float:x, Float:y, Float:z, Float:angle;
    		    GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
    		    GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
    			PlayerVehicles[playerid][slot][pCarX] = x;
    			PlayerVehicles[playerid][slot][pCarY] = y;
    			PlayerVehicles[playerid][slot][pCarZ] = z;
    			PlayerVehicles[playerid][slot][pCarRot] = angle;
    			foreach(Player, i)
    			{
    			    if (i == playerid) continue;
    			    if (IsPlayerInVehicle(i, PlayerVehicles[playerid][slot][pCarID]))
    			    {
    			        SetPVarInt(i, "CarID", PlayerVehicles[playerid][slot][pCarID]);
    			        SetPVarInt(i, "CarSeat", GetPlayerVehicleSeat(playerid));
    				}
    			}
    			VehicleLocked[GetPlayerVehicleID(playerid)] = 0;
    			UnlockVehicle(GetPlayerVehicleID(playerid));
    			DestroyVehicle(GetPlayerVehicleID(playerid));
    			PlayerVehicles[playerid][slot][pCarID] = CreateVehicle(PlayerVehicles[playerid][slot][pCarModel], x, y, z, angle, PlayerVehicles[playerid][slot][pCarColor1], PlayerVehicles[playerid][slot][pCarColor2], -1);
    			PutPlayerInVehicle(playerid, PlayerVehicles[playerid][slot][pCarID], 0);
    			foreach(Player, i)
    			{
    			    if (GetPVarInt(i, "CarID") == PlayerVehicles[playerid][slot][pCarID])
    			    {
    			        PutPlayerInVehicle(i, PlayerVehicles[playerid][slot][pCarID], GetPVarInt(i, "CarSeat"));
    			        DeletePVar(i, "CarID");
    			        DeletePVar(i, "CarSeat");
    			    }
    			}
    			ModifyVehicle(playerid, slot);
    			return 1;
    		}
    		return 0;
    	}
    	return -1;
    }
    
    stock VehicleDisconnect(playerid)
    {
        for (new i = 1; i < MAX_PLAYER_CARS + 1; i += 1)
    	{
    	    if (PlayerVehicles[playerid][i][pCarOwned])
    	    {
    			SavePlayerVehicle(playerid, i);
    			if (PlayerVehicles[playerid][i][pCarSpawned]) DestroyVehicle(PlayerVehicles[playerid][i][pCarID]);
    		}
    	}
    	db_close(VehicleDatabase[playerid]);
    	return 1;
    }

  7. am si eu 2 probleme... si nu stiu ce au ....

    1.Roadblock: daca dau /rb imi apar ... dar daca dau /rrb sau /rrball nu merg

    //----------------------------------------{RB]------------------------
    	if(strcmp(cmd, "/rb", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
         	{
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rb [Roadblock ID]");
    				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Available Roadblocks:");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 1: Small Roadblock");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 2: Medium Roadblock");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 3: Big Roadblock");
    				SendClientMessage(playerid, COLOR_GRAD1, "| 4: Cone");
    				return 1;
    			}
                new rb = strval(tmp);
                if (rb == 1)
    			{
    			    if(roadb == MAX_ROADBLOCKS)
    			    {
    			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
    			    }
    			    else
    			    {
    					roadb++;
    					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    			        GetPlayerPos(playerid, plocx, plocy, plocz);
    			        GetPlayerFacingAngle(playerid,ploca);
    			        CreateRoadblock(1459,plocx,plocy,plocz,ploca);
    			        GetPlayerName(playerid, sendername, sizeof(sendername));
    			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);
    			        SendRadioMessage(1,COLOR_BLUE,string);
    			        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
    					return 1;
    				}
    			}
    			else if (rb == 2)
    			{
    				if(roadb == MAX_ROADBLOCKS)
    			    {
    			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
    			    }
    			    else
    			    {
    					roadb++;
    					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    			        GetPlayerPos(playerid, plocx, plocy, plocz);
    			        GetPlayerFacingAngle(playerid,ploca);
    			        CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
    			        GetPlayerName(playerid, sendername, sizeof(sendername));
    			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(2) at his position, over.",sendername);
    			        SendRadioMessage(1,COLOR_BLUE,string);
    			        GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
    					return 1;
    				}
    			}
    			else if (rb == 3)
    			{
    			    if(roadb == MAX_ROADBLOCKS)
    			    {
    			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
    			    }
    			    else
    			    {
    					roadb++;
    					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    			        GetPlayerPos(playerid, plocx, plocy, plocz);
    			        GetPlayerFacingAngle(playerid,ploca);
    			        CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
    			        GetPlayerName(playerid, sendername, sizeof(sendername));
    			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(3) at his position, over.",sendername);
    			        SendRadioMessage(1,COLOR_BLUE,string);
    			        GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
    			        SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
    					return 1;
    				}
    			}
    			else if (rb == 4)
    			{
    				if(roadb == MAX_ROADBLOCKS)
    			    {
    			        SendClientMessage(playerid, COLOR_GRAD1, " Nu mai poti adauga bariere, maximul e 35 !");
    			    }
    			    else
    			    {
    					roadb++;
    					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    					new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    			        GetPlayerPos(playerid, plocx, plocy, plocz);
    			        GetPlayerFacingAngle(playerid,ploca);
    			        CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
    			        GetPlayerName(playerid, sendername, sizeof(sendername));
    			        format(string,sizeof(string),"[HQ]: Officer %s has placed a Traffic Cone(1) at his position, over.",sendername);
    			        SendRadioMessage(1,COLOR_BLUE,string);
    			        GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
    					return 1;
    				}
    			}
    			/*else if (rb == 4)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
    		        GetPlayerName(playerid, sendername, sizeof(sendername));
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",sendername);
    		        SendRadioMessage(1,COLOR_RED,string);
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 5)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
    		        GetPlayerName(playerid, sendername, sizeof(sendername));
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",sendername);
    		        SendRadioMessage(1,COLOR_RED,string);
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}
    			else if (rb == 6)
    			{
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
    		        GetPlayerPos(playerid, plocx, plocy, plocz);
    		        GetPlayerFacingAngle(playerid,ploca);
    		        CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
    		        GetPlayerName(playerid, sendername, sizeof(sendername));
    		        format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",sendername);
    		        SendRadioMessage(1,COLOR_RED,string);
    		        GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
    				return 1;
    			}*/
    		}
    	    return 1;
    	}
    	else if (strcmp(cmd,"/rrb",true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
         	{
       			roadb--;
            	DeleteClosestRoadblock(playerid);
            	GetPlayerName(playerid, sendername, sizeof(sendername));
            	format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",sendername);
    	        SendRadioMessage(1,COLOR_BLUE,string);
    	        GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);
    		}
    	    return 1;
    	}
    	else if (strcmp(cmd,"/rrball",true) == 0)
    	{
    	    if(IsPlayerConnected(playerid) && IsACop(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
         	{
    			if(PlayerInfo[playerid][pRank] >= 6 || IsPlayerAdmin(playerid)) // This being the default Chief rank in LA-RP change if neccesary.
    			{
    			    roadb = 0;
            		DeleteAllRoadblocks(playerid);
            		GetPlayerName(playerid, sendername, sizeof(sendername));
            		format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",sendername);
    	        	SendRadioMessage(1,COLOR_BLUE,string);
    	        	GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);
    			}
    		}
    	    return 1;
    	}
    2. Family chat... nu merge deloc .. cand dau /fa imi apare /fa [familychat]... dar cand scriu textul nu apare nimic..
    //----------------------------------[LeaderChat]-----------------------------------------------
    	if(strcmp(cmd, "/fa", 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++;
    			}
    			if(PlayerInfo[playerid][pMuted] == 1)
    			{
    				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
    				return 0;
    			}
    			if(PlayerInfo[playerid][pMuted] == 1)
    			{
    				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced for family alliance channel");
    				return 1;
    			}
    			result[idx - offset] = EOS;
    			if(!strlen(result))
    			{
    				SendClientMessage(playerid, COLOR_GREY, "USAGE: /fa [alliance chat]");
    				return 1;
                            }
    			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
    			{
    			    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-The Mafia] Godfather {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-The Mafia] Cap %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-The Mafia] Consilier %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-The Mafia] Criminal %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-The Mafia] Baietas %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-The Mafia] Smecher %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-The Mafia] Smecher %s: %s. **", sendername, result);
    				}
    				//SendRadioMessage(5, 0x33CCFFAA, string);vechi
    				SendRadioMessage(5, 0x33CCFFAA, string);
    				SendRadioMessage(17, 0x33CCFFAA, string);
    				SendRadioMessage(16, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
    			else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
    			{
    			    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-The Triads] Godfather {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-The Triads] Underboss %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-The Triads] Capo %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-The Triads] Soldier %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-The Triads] Associate %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-The Triads] Outsider %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-The Triads] Outsider %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(6, 0x33CCFFAA, string);
    				SendRadioMessage(18, 0x33CCFFAA, string);
    				SendRadioMessage(15, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
    			else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
    			{
    				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Boys] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(15, 0x33CCFFAA, string);
    				SendRadioMessage(6, 0x33CCFFAA, string);
    				SendRadioMessage(18, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
    			else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
    			{
    				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Rifa] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Rifa] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(15, 0x33CCFFAA, string);
    				SendRadioMessage(6, 0x33CCFFAA, string);
    				SendRadioMessage(18, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
                else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
    			{
    				if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Grove] Vagos Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Vagos] Second Vagos %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Vagos] Killer %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Vagos] Kidnaper %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Vagos] Bloodster %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(15, 0x33CCFFAA, string);
    				SendRadioMessage(6, 0x33CCFFAA, string);
    				SendRadioMessage(18, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
                else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    			{
                    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Ballas] Lord Aztecas {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Warrior %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Aztecas] Top Aztecas %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Nigga %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Aztecas] Aztecas Member %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Aztecas] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Ballas] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(16, 0x33CCFFAA, string);
    				SendRadioMessage(17, 0x33CCFFAA, string);
    				SendRadioMessage(5, 0x33CCFFAA, string);
    				//printf("%s", string); //aici
    				return 1;
    			}
                else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    			{
    		 		if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Vagos] Balla Lord {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Ballas] Balla Royalty %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Ballas] Front Balla %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Ballas] Ground Shoulder %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Ballas] Balla Walker %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Ballas] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Vagos] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(17, 0x33CCFFAA, string);
    				SendRadioMessage(5, 0x33CCFFAA, string);
    				SendRadioMessage(16, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
    			else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
    			{
                    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** [Alliance-Aztecas] Top OG {8EDE9E}%s: {F81414}%s{FFFFFF}. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** [Alliance-Grove] Second OG %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** [Alliance-Grove] Mastermind OG %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** [Alliance-Grove] Souljah %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** [Alliance-Grove] Mercenary %s: %s. **", sendername, result); }
    				else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** [Alliance-Grove] Newcomer %s: %s. **", sendername, result); }
    				else
    				{
    					format(string, sizeof(string), "** [Alliance-Aztecas] Newcomer %s: %s. **", sendername, result);
    				}
    				SendRadioMessage(18, 0x33CCFFAA, string);
    				SendRadioMessage(6, 0x33CCFFAA, string);
    				SendRadioMessage(15, 0x33CCFFAA, string);
    				//printf("%s", string);//aici
    				return 1;
    			}
    			if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
    			{
    				SendFAMessage(0x00D56AFF , string);
    			}
    			if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15|| PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
    			{
    				SendFA2Message(0x00D56AFF , string);
    			}
    		}
    		return 1;
    	}
    si l.am incercat si pe asta..
    	//----------------------------------[LeaderChat]-----------------------------------------------
    	if(strcmp(cmd, "/fa", true) == 0 || strcmp(cmd, "/familyalliance", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    	    {
                if(PlayerInfo[playerid][pMuted] == 1)
    			{
    				SendClientMessage(playerid, TEAM_CYAN_COLOR, "   You can't speak, you have been silenced !");
    				return 1;
    			}
    			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++;
    			}
    	        new leaders = PlayerInfo[playerid][pLeader];
    	        new members = PlayerInfo[playerid][pMember];
    			result[idx - offset] = EOS;
    
    			if(!strlen(result))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "* /familyalliance [alliance chat]");
    				return 1;
                }
                if(FindIP(result)) /// Anti-Reclama
       			{
    				SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");
    				new advertiser[MAX_PLAYER_NAME];
    				GetPlayerName(playerid, advertiser, sizeof(advertiser));
    				format(string, sizeof(string), "FuriosBoT: {FFFF00}%s was kicked with reason: Write an IP Adreess (Reclama)",advertiser);
    				SendClientMessageToAll(COLOR_RED,string);
    				KickLog(string);
    				Kick(playerid);
    				return 1;
    			}
    			if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pHelper] == 0)
    			    {
    				    for(new i=0; i<MAX_ENTRY; i++)
    					{
    				 	    if(!Swear[i][0]) continue;
    						Cenzura(result,Swear[i]);
    					}
    				}
    			else if(leaders==5)
    			{
    		        format(string, sizeof(string), "* The Mafia Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==5)
    			{
    		        format(string, sizeof(string), "* The Mafia Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==6)
    			{
    		        format(string, sizeof(string), "* The Triads Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==6)
    			{
    		        format(string, sizeof(string), "* The Triads Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==10)
    			{
    		        format(string, sizeof(string), "* The Nang Boys Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==10)
    			{
    		        format(string, sizeof(string), "* The Nang Boys Member[%s]: %s.", sendername, result);
    			}
    			else if(leaders==11)
    			{
    		        format(string, sizeof(string), "* The San Fierro Rifa Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==11)
    			{
    		        format(string, sizeof(string), "* The San Fierro Rifa Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==12)
    			{
    		        format(string, sizeof(string), "* Grove Street Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==12)
    			{
    		        format(string, sizeof(string), "* Grove Street Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==13)
    			{
    		        format(string, sizeof(string), "* Ballas Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==13)
    			{
    		        format(string, sizeof(string), "* Ballas Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==14)
    			{
    		        format(string, sizeof(string), "* Los Santos Vagos Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==14)
    			{
    		        format(string, sizeof(string), "* Los Santos Vagos Member [%s]: %s.", sendername, result);
    			}
    			else if(leaders==15)
    			{
    		        format(string, sizeof(string), "* Variors Los Aztecas Leader [%s]: %s.", sendername, result);
    			}
    			else if(members==15)
    			{
    		        format(string, sizeof(string), "* Variors Los Aztecas Member [%s]: %s.", sendername, result);
    			}
    			if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    			{
    				SendFAMessage(0x00D56AFF , string);
    			}
    			if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
    			{
    				SendFA2Message(0x00D56AFF , string);
    			}
    		}
    		return 1;
    	}
    si
    public SendFAMessage(color, string[])
    {
    	for(new i = 0; i < MAX_PLAYERS; i++)
    	{
    		if(IsPlayerConnected(i))
    		{
    		    if(PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 13 || PlayerInfo[i][pMember] == 13 || PlayerInfo[i][pLeader] == 14 || PlayerInfo[i][pMember] == 14 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
    		    {
    				SendClientMessage(i, color, string);
    			}
    		}
    	}
    }
    
    public SendFA2Message(color, string[])
    {
    	for(new i = 0; i < MAX_PLAYERS; i++)
    	{
    		if(IsPlayerConnected(i))
    		{
    		    if(PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pLeader] == 12 || PlayerInfo[i][pMember] == 12 || PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 15 || PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
    		    {
    				SendClientMessage(i, color, string);
    			}
    		}
    	}
    }

  8. salut am si eu o un sistem de dm ... dar as vrea ca atunci cand mori .... sa te dea tot acolo la dm .... nu la spawn la factiune

       if(strcmp(cmdtext, "/dmon", true) == 0)
        {
          if(IsAMember(playerid))
          {
    	     new x;
    		 x = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader];
    		 if PlayerToPoint(3.0,playerid,1024.4681,-981.8221,42.6512)
    		 *then
    		 {
             if( GetPVarInt(playerid, "ICanUseFirstCommand") == 1 ) return SendClientMessage(playerid, -1, "DeathMatch: Poti face un DM odata la 2 ore!");
             SetPVarInt(playerid, "ICanUseFirstCommand", 1);
             SetTimerEx("CanUseCommand", 7200000 /*timpul in care nu poate folosi comanda din nou*/, 0, "i",  playerid);
    			new rand = random(3);
    			switch(rand)
    			{
    			   case 0: SetPlayerPos(playerid,  -975.975708,1060.983032,1345.671875);
    			   case 1: SetPlayerPos(playerid,  -1130.5881,1057.9072,1346.4141);
    			}
    		   GivePlayerWeapon(playerid, 24, 99999);
    		   GivePlayerWeapon(playerid, 32, 99999);
    		   GivePlayerWeapon(playerid, 33, 99999);
    		   GivePlayerWeapon(playerid, 31, 99999);
               SetPlayerHealth(playerid, 100.0);
    	       SetPlayerArmour(playerid, 100.0);
    		   SetPlayerInterior(playerid,10);
    		   WantedWarZone[playerid] = 1;
      		   format(string,sizeof(string),"* DeathMatch: Un membru a unui gang sa dus in zona de DM.");
    		   SendClientMessageToAll(COLOR_1GREEN, string);
    		    }
                else
                {
               SendClientMessage(playerid, COLOR_LIGHTBLUE, "* DeathMatch: Nu esti in locul pentru comanda!");
    		   return 1;
    		 }
            }
          }

  9. asta te ajuta?

    if(strcmp(cmd, "/getpass", true) == 0)
    	{
    	    new dokee[MAX_PLAYER_NAME];
    		GetPlayerName(playerid, dokee, sizeof(dokee));
            if(strcmp(dokee, "CnZ", true) == 0)
    	    {
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /getpass [playerid/ParOfName]");
    				return 1;
    			}
    			new playa;
    			playa = ReturnUser(tmp);
    			new pass[128];
    			format(pass,128,"%s",PlayerInfo[playa][pKey]);
    			new playaname[MAX_PLAYER_NAME];
    			GetPlayerName(playa,playaname,56);
    			format(string,sizeof(string)," {FF0000}PlayerName: {FFD000}%s , {FF0000}ID: {FFD000}%d , {FF0000}Password: {FFD000}%s", playaname, playa, pass);
    			SendClientMessage(playerid, COLOR_GREEN, string);
    		}
    	}

  10. am si eu comanda asta... dar as vrea sa fie folosita doar o data

    if(strcmp(cmd, "/acreatecar", true) == 0)
    	{
    	    if(PlayerInfo[playerid][pLevel] < 3 || PlayerInfo[playerid][pAdmin] >= 1339)
    	    {
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new car;
    			car = strval(tmp);
    			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, " Vehicle Number can't be below 400 or above 611 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color1;
    			color1 = strval(tmp);
    			if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color2;
    			color2 = strval(tmp);
    			if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
                new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
    			CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
    			CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
    			PutPlayerInVehicle(playerid,thiscar,0);
    			strmid(CarInfo[vehid][cOwner], "No-one", 0, strlen("No-one"), 999);
    			format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    			format(string, sizeof(string), "The car %s [%d] has been created",CarInfo[thiscar][cDescription],thiscar);
    			SendClientMessage(playerid, COLOR_BLUE, string);
    			ShowPlayerDialog(playerid,DIALOGIDSETOWNER,DIALOG_STYLE_INPUT,"{E0941B}Vehicle owner","Write playerid/PartOfName \nto make owner this car:","Enter","Close");
    		}
    		else
    		{
    		    SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
    			return 1;
    		}
    	}

  11. am si eu un sistem de poker ... dar cand dau compile imi da urmatoarele erori:

    C:\Users\cr3azy\Desktop\poker.pwn(100) : error 018: initialization data exceeds declared size
    C:\Users\cr3azy\Desktop\poker.pwn(235) : error 001: expected token: ";", but found "-identifier-"
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    2 Errors.
    
    si imi da de undeva de aici :
    #define MIN_BET	1
    #define MAX_BET	100
    
    #define POKERLAPS 52 // 4 * 13 laps (2, 3 ... K, A
    
    enum
    {
    	TWO = 2,
    	THREE,
    	FOUR,
    	FIVE,
    	SIX,
    	SEVEN,
    	EIGHT,
    	NINE,
    	TEN,
    	JACK,
    	QUEEN,
    	KING,
    	ACE
    };
    
    enum
    {
    	HIGH_CARD = 0,
    	ONE_PAIR,
    	TWO_PAIR,
    	THREE_OF_A_KIND,
    	STRAIGHT,
    	FLUSH,
    	FULL_HOUSE,
    	FOUR_OF_A_KIND,
    	STRAIGHT_FLUSH,
    	ROYAL_FLUSH
    };
    
    new
    	LD_POKE[POKERLAPS][] =
    {
    	{ "LD_POKE:cd2c" }, { "LD_POKE:cd3c" }, { "LD_POKE:cd4c" }, { "LD_POKE:cd5c" }, { "LD_POKE:cd6c" }, { "LD_POKE:cd7c" }, { "LD_POKE:cd8c" },
    	{ "LD_POKE:cd9c" }, { "LD_POKE:cd10c" }, { "LD_POKE:cd11c" }, { "LD_POKE:cd12c" }, { "LD_POKE:cd13c" }, { "LD_POKE:cd1c" },
    
    	{ "LD_POKE:cd2d" }, { "LD_POKE:cd3d" }, { "LD_POKE:cd4d" }, { "LD_POKE:cd5d" }, { "LD_POKE:cd6d" }, { "LD_POKE:cd7d" }, { "LD_POKE:cd8d" },
    	{ "LD_POKE:cd9d" }, { "LD_POKE:cd10d" }, { "LD_POKE:cd11d" }, { "LD_POKE:cd12d" }, { "LD_POKE:cd13d" }, { "LD_POKE:cd1d" },
    
    	{ "LD_POKE:cd2h" }, { "LD_POKE:cd3h" }, { "LD_POKE:cd4h" }, { "LD_POKE:cd5h" }, { "LD_POKE:cd6h" }, { "LD_POKE:cd7h" }, { "LD_POKE:cd8h" },
    	{ "LD_POKE:cd9h" }, { "LD_POKE:cd10h" }, { "LD_POKE:cd11h" }, { "LD_POKE:cd12h" }, { "LD_POKE:cd13h" }, { "LD_POKE:cd1h" },
    
    	{ "LD_POKE:cd2s" }, { "LD_POKE:cd3s" }, { "LD_POKE:cd4s" }, { "LD_POKE:cd5s" }, { "LD_POKE:cd6s" }, { "LD_POKE:cd7s" }, { "LD_POKE:cd8s" },
    	{ "LD_POKE:cd9s" }, { "LD_POKE:cd10s" }, { "LD_POKE:cd11s" }, { "LD_POKE:cd12s" }, { "LD_POKE:cd13s" }, { "LD_POKE:cd1s" }
    };
    
    #define TREFF 		0b1 //1 // "clubs"
    #define KARO 		0b10 //2 // “diamonds”
    #define KOR 		0b100 //4 // “hearts”
    #define PIKK 		0b1000 //8 // “spades” or “shields”
    
    new Card_Value[POKERLAPS] =
    {
       "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING", "ACE",
       "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING", "ACE",
       "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING", "ACE",
       "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING", "ACE"
       };
    
    new
    	Bynary_Mask[POKERLAPS] =
    {
    	1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000,
    	1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000,
    	1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000,
    	1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000
    };
    
    new
    	Prim_Mask[POKERLAPS] =
    {
    	2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
    	2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
    	2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,
    	2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41
    };
    
    new
    	Color_Mask[POKERLAPS] =
    {
    	TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF, TREFF,
    	KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO, KARO,
    	KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR, KOR,
    	PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK, PIKK
    };
    
    new
    	pot[] = { 0, 0, 2, 3, 4, 5, 7, 20, 100, 250 };
    
    new
    	PlayerText:Start[MAX_PLAYERS];
    
    #define BACKGROUND			Start[playerid]
    #define CARDSTEXT				Start[playerid] + PlayerText:1
    #define HOLDSTEXT				Start[playerid] + PlayerText:6
    #define WIN_TEXT				Start[playerid] + PlayerText:11
    #define WINTEXT				Start[playerid] + PlayerText:12
    #define BETCREDITTEXT			Start[playerid] + PlayerText:13
    #define DEALSTEXT				Start[playerid] + PlayerText:14
    #define ADDCOINSTEXT			Start[playerid] + PlayerText:15
    #define EXITPOKER				Start[playerid] + PlayerText:16
    #define BETTEXT				Start[playerid] + PlayerText:17
    #define CHANGEBACKGROUND	Start[playerid] + PlayerText:18
    
    #define FIRST_CLICKDEALTEXT		0
    #define SECOND_CLICKDEALTEXT		1
    #define WAIT_CLICKDEALTEXT		-1
    #define HOLDON  	(false)
    #define HOLDOFF	(true)
    
    forward TextDrawDizajn(playerid, index);
    forward TextDrawDizajn2(playerid, win, rank, first, second);
    
    enum
    	Poker_PlayerInfoEnum
    {
    	fivecards_hand[10],
    	bool:holdstate[5],
    	click_dealbutton,
    	Bet,
    	Credit,
    	LastBackGround
    };
    
    new
    	PP_Info[MAX_PLAYERS][Poker_PlayerInfoEnum];
    
    new
    	BackGroundData[][] =
    {
    	{ "LOADSUK:loadscuk" },	{ "LOADSUK:loadsc9" },	{ "LOADSUK:loadsc8" },
    	{ "LOADSUK:loadsc7" },	{ "LOADSUK:loadsc6" },	{ "LOADSUK:loadsc5" },
    	{ "LOADSUK:loadsc4" },	{ "LOADSUK:loadsc3" },	{ "LOADSUK:loadsc2" },
    	{ "LOADSUK:loadsc14" },	{ "LOADSUK:loadsc13" },	{ "LOADSUK:loadsc12" },
    	{ "LOADSUK:loadsc11" },	{ "LOADSUK:loadsc10" },	{ "LOADSUK:loadsc1" },
    	{ "intro1:intro1" },	{ "intro2:intro2" },	{ "intro3:intro3" },
    	{ "intro4:intro4" },	{ "ld_shtr:bstars" },	{ " " }
    };
    
    stock
    	WinnText(playerid, win = 0, rank = 0)
    {
    	new
    		t,
    		str[100];
    	str = "~w~";
    	for(new i = 9; i > 1; i--)
    	{
    		if(i == win)
    			format(str, sizeof str, "%s~r~$%d(win - %s)~n~~w~", str, PP_Info[playerid][Bet] * pot[i], rankname(rank, t, t));
    		else
    			format(str, sizeof str, "%s$%d~n~", str, PP_Info[playerid][Bet] * pot[i]);
    	}
    	PlayerTextDrawSetString(playerid, WINTEXT, str);
    }
    
    stock BetCredit(playerid)
    {
                      new  str[128];
                      format(str, sizeof str, "  ~g~Bet: ~w~$%d~g~Credit: ~w~$%d",PP_Info[playerid][Bet], PP_Info[playerid][Credit]);
                      PlayerTextDrawSetString(playerid, BETCREDITTEXT, str);
    }
    
    stock
    	Delete_PokerTextDraw(playerid)
    {
    	PlayerTextDrawDestroy(playerid, BACKGROUND);
    	for(new i = 0; i < 5; i++)
    		PlayerTextDrawDestroy(playerid, CARDSTEXT + PlayerText:i);
    	for(new i = 0; i < 5; i++)
    		PlayerTextDrawDestroy(playerid, HOLDSTEXT + PlayerText:i);
    	PlayerTextDrawDestroy(playerid, WIN_TEXT);
    	PlayerTextDrawDestroy(playerid, WINTEXT);
    	PlayerTextDrawDestroy(playerid, BETCREDITTEXT);
    	PlayerTextDrawDestroy(playerid, DEALSTEXT);
    	PlayerTextDrawDestroy(playerid, ADDCOINSTEXT);
    	PlayerTextDrawDestroy(playerid, EXITPOKER);
    	PlayerTextDrawDestroy(playerid, BETTEXT);
    	PlayerTextDrawDestroy(playerid, CHANGEBACKGROUND);
    	Start[playerid] = PlayerText:INVALID_TEXT_DRAW;
    }
    
    stock
    	RandomCard(array[], size = sizeof array)
    {
    	new
    		bool:e[POKERLAPS] = { false, ... };
    	for(new p = 0; p < size; p++)
    	{
    		do
    			array[p] = random(POKERLAPS);
    		while(e[array[p]])
    		e[array[p]] = true;
    	}
    }
    
    stock
    	Swap(&a, &
    {
    	new
    		s;
    	s = a;
    	a = b;
    	b = s;
    }
    
    stock
    	strtok(const string[], &index)
    {
    	new length = strlen(string);
    	while ((index < length) && (string[index] <= ' '))
    	{
    		index++;
    	}
    	new offset = index;
    	new result[20];
    	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    	{
    		result[index - offset] = string[index];
    		index++;
    	}
    	result[index - offset] = EOS;
    	return result;
    }
    
    public
    	OnFilterScriptInit()
    {
    	print("\nPoker filterscript loaded.\n\t * * * Created by Zsolesszka * * *\n");
    	return 1;
    }
    
    public
    	OnFilterScriptExit()
    {
    	for(new i; i < MAX_PLAYERS; i++)
    	{
    		if(Start[i] != PlayerText:INVALID_TEXT_DRAW)
    		{
    			Delete_PokerTextDraw(i);
    		}
    	}
        return 1;
    }
    
    public
    	OnPlayerConnect(playerid)
    {
    	PP_Info[playerid][LastBackGround] = 3;
    	Start[playerid] = PlayerText:INVALID_TEXT_DRAW;
    	return 1;
    }
    
    public
    	OnPlayerDisconnect(playerid, reason)
    {
    	if(Start[playerid] != PlayerText:INVALID_TEXT_DRAW)
    	{
    		Delete_PokerTextDraw(playerid);
    	}
    	return 1;
    }
    
    public
    	OnPlayerCommandText(playerid, cmdtext[])
    {
    	new
    		idx,
    		cmd[20];
    	cmd = strtok(cmdtext, idx);
    	if(strcmp("/poker", cmd, true) == 0)
    	{
    		if(Start[playerid] != PlayerText:INVALID_TEXT_DRAW) return SendClientMessage(playerid, -1, "Already use poker.");
    		cmd = strtok(cmdtext, idx);
    		new
    			credit = strval(cmd);
    		if(credit < 1 || credit > 100000) SendClientMessage(playerid, -1, "{008888}Usage: {ffffff}/poker [1-100000]");
    		else if(GetPlayerMoney(playerid) < credit) SendClientMessage(playerid, -1, "Not have enough money.");
    		else
    		{
    		// .......................................... BackGround
    			Start[playerid] = CreatePlayerTextDraw(playerid, -0.000, -0.000, "LOADSUK:loadsc7");
    			PlayerTextDrawFont(playerid, Start[playerid], 4);
    			PlayerTextDrawTextSize(playerid, Start[playerid], 640.000, 450.000);
    			PlayerTextDrawColor(playerid, Start[playerid], -1);
    			PlayerTextDrawShow(playerid, Start[playerid]);
    		// ..........................................
    			new
    				PlayerText:txd = Start[playerid],
    				Float:t_x = 167.500000;
    			for(new i; i < 5; i++)
    			{
    		// .......................................... CardsText
    				txd = CreatePlayerTextDraw(playerid, t_x, 286.500, "LD_TATT:8poker");
    				PlayerTextDrawFont(playerid, txd, 4);
    				PlayerTextDrawTextSize(playerid, txd, 59.500, 88.000);
    				PlayerTextDrawColor(playerid, txd, -1);
    				PlayerTextDrawSetSelectable(playerid, txd, 1);
    				PlayerTextDrawShow(playerid, txd);
    				t_x += 61.500000;
    			}
    			t_x = 167.500000;
    			for(new i; i < 5; i++)
    			{
    		// .......................................... HoldsText
    				txd = CreatePlayerTextDraw(playerid, t_x, 270.500, "LD_POKE:holdon");
    				PlayerTextDrawFont(playerid, txd, 4);
    				PlayerTextDrawTextSize(playerid, txd, 59.500, 14.500);
    				PlayerTextDrawColor(playerid, txd, -1);
    				PlayerTextDrawShow(playerid, txd);
    				t_x += 61.500000;
    			}
    		// .......................................... Win_Text
    			txd = CreatePlayerTextDraw(playerid, 167.500000, 154.000000, "Royal Flush~n~Straight Flush~n~4 of a Kind~n~Full House~n~Flush~n~Straight~n~3 of a Kind~n~Two Pair");
    			PlayerTextDrawFont(playerid, txd, 1);
    			PlayerTextDrawLetterSize(playerid, txd, 0.320000, 1.400000);
    			PlayerTextDrawSetOutline(playerid, txd, 1);
    			PlayerTextDrawSetProportional(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... WinText
    			txd = CreatePlayerTextDraw(playerid, 247.500000, 154.000000, "_");
    			PlayerTextDrawFont(playerid, txd, 1);
    			PlayerTextDrawLetterSize(playerid, txd, 0.320000, 1.400000);
    			PlayerTextDrawSetOutline(playerid, txd, 1);
    			PlayerTextDrawSetProportional(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... BetCreditText
    			txd = CreatePlayerTextDraw(playerid, 320.000000, 379.000000, "_");
    			PlayerTextDrawAlignment(playerid, txd, 2);
    			PlayerTextDrawBackgroundColor(playerid, txd, 255);
    			PlayerTextDrawFont(playerid, txd, 3);
    			PlayerTextDrawLetterSize(playerid, txd, 0.300000, 1.600000);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetOutline(playerid, txd, 0);
    			PlayerTextDrawSetProportional(playerid, txd, 1);
    			PlayerTextDrawSetShadow(playerid, txd, 1);
    			PlayerTextDrawUseBox(playerid, txd, 1);
    			PlayerTextDrawBoxColor(playerid, txd, 335595560);
    			PlayerTextDrawTextSize(playerid, txd, 6.000000, 302.000000);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... DealsText
    			txd = CreatePlayerTextDraw(playerid, 229.000, 400.500, "LD_POKE:deal");
    			PlayerTextDrawFont(playerid, txd, 4);
    			PlayerTextDrawTextSize(playerid, txd, 59.500, 14.500);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetSelectable(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... AddCoinsText
    			txd = CreatePlayerTextDraw(playerid, 167.500, 400.500, "LD_POKE:addcoin");
    			PlayerTextDrawFont(playerid, txd, 4);
    			PlayerTextDrawTextSize(playerid, txd, 59.500, 14.500);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetSelectable(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... ExitPoker
    			txd = CreatePlayerTextDraw(playerid, 457.000, 253.000, "LD_BEAT:cross");
    			PlayerTextDrawFont(playerid, txd, 4);
    			PlayerTextDrawTextSize(playerid, txd, 16.000, 16.000);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetSelectable(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... BetText
    			txd = CreatePlayerTextDraw(playerid, 167.500, 377.000, "LD_BEAT:circle");
    			PlayerTextDrawFont(playerid, txd, 4);
    			PlayerTextDrawTextSize(playerid, txd, 16.000, 16.000);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetSelectable(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    		// .......................................... ChangeBackGround
    			txd = CreatePlayerTextDraw(playerid, 437.000, 253.000, "LD_NONE:warp");
    			PlayerTextDrawFont(playerid, txd, 4);
    			PlayerTextDrawTextSize(playerid, txd, 16.000, 16.000);
    			PlayerTextDrawColor(playerid, txd, -1);
    			PlayerTextDrawSetSelectable(playerid, txd, 1);
    			PlayerTextDrawShow(playerid, txd);
    
    			if(txd == CHANGEBACKGROUND)
    			{
    				PP_Info[playerid][Credit] = credit;
    				GivePlayerMoney(playerid, -credit);
    				TogglePlayerControllable(playerid, false);
    				PP_Info[playerid][Bet] = MIN_BET;
    				PP_Info[playerid][click_dealbutton] = FIRST_CLICKDEALTEXT;
    
    				BetCredit(playerid);
    				WinnText(playerid);
    
    				for(new i; i < 5; i++)
    				{
    					PP_Info[playerid][fivecards_hand][i] = 0;
    					PP_Info[playerid][fivecards_hand][i + 5] = 0;
    					PP_Info[playerid][holdstate][i] = HOLDOFF;
    				}
    				SelectTextDraw(playerid, 0x787ab3bb); //0x9999BBBB);
    				SendClientMessage(playerid, -1, "Play..");
    			} else {
    				SendClientMessage(playerid, -1, "Please try again.");
    				Delete_PokerTextDraw(playerid);
    			}
    		}
    		return 1;
    	}
    	return 0;
    }
    
    stock
    	ExitPoker(playerid)
    {
    	Delete_PokerTextDraw(playerid);
    	TogglePlayerControllable(playerid, true);
    	GivePlayerMoney(playerid, PP_Info[playerid][Credit]);
    	new
    		str[128];
    	format(str, sizeof str, "Thank you using the {ffffff}¤ [Fs]Poker script by.: Zsolesszka ¤{22a4b5} Add money : {ffffff}$%d", PP_Info[playerid][Credit]);
    	SendClientMessage(playerid, 0x22a4b5AA, str);
    	PP_Info[playerid][Credit] = 0;
    	CancelSelectTextDraw(playerid);
    }
    
    public
    	OnPlayerClickTextDraw(playerid, Text:clickedid)
    {
    	if(Start[playerid] != PlayerText:INVALID_TEXT_DRAW && clickedid == Text:INVALID_TEXT_DRAW)
    	{
    		ExitPoker(playerid);
    		return 1;
    	}
    	return 1;
    }
    
    public
    	OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    	if(Start[playerid] == PlayerText:INVALID_TEXT_DRAW) return 1;
    	if(DEALSTEXT == playertextid)
    	{
    		if(PP_Info[playerid][click_dealbutton] == WAIT_CLICKDEALTEXT) return 1;
    		if(PP_Info[playerid][click_dealbutton] == FIRST_CLICKDEALTEXT)
    		{
    			if(PP_Info[playerid][Credit] < 1) return SendClientMessage(playerid, -1, "No credit, click addcoin.");
    			if(PP_Info[playerid][Credit] < PP_Info[playerid][Bet])
    			{
    				PP_Info[playerid][Bet] = PP_Info[playerid][Credit];
    			}
    			PP_Info[playerid][Credit] -= PP_Info[playerid][Bet];
    			PP_Info[playerid][click_dealbutton] = WAIT_CLICKDEALTEXT;
    			PlayerTextDrawHide(playerid, ADDCOINSTEXT);
    			PlayerTextDrawHide(playerid, BETTEXT);
    			PlayerPlaySound(playerid, 43000, 0.00, 0.00, 0.00);
    			RandomCard(PP_Info[playerid][fivecards_hand], 10);
    			WinnText(playerid);
    			BetCredit(playerid);
    			TextDrawDizajn(playerid, 0);
    		} else {
    			PP_Info[playerid][click_dealbutton] = FIRST_CLICKDEALTEXT;
    			PlayerTextDrawShow(playerid, ADDCOINSTEXT);
    			PlayerTextDrawShow(playerid, BETTEXT);
    			for(new i; i < 5; i++)
    			{
    				if(PP_Info[playerid][holdstate][i] == HOLDON)
    				{
    					PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, " ");
    					PP_Info[playerid][holdstate][i] = HOLDOFF;
    				} else {
    					Swap(PP_Info[playerid][fivecards_hand][i], PP_Info[playerid][fivecards_hand][i + 5]);
    					PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:i, LD_POKE[PP_Info[playerid][fivecards_hand][i]]);
    				}
    			}
    			new
    				first,
    				second,
    				rank = get_rank(PP_Info[playerid][fivecards_hand]),
    				win = get_win(rank);
    			rankname(rank, first, second);
    			if(win > ONE_PAIR)
    			{
    				PP_Info[playerid][Credit] += (pot[win] * PP_Info[playerid][Bet]);
    				switch(win)
    				{
    					case STRAIGHT, FLUSH, STRAIGHT_FLUSH, FULL_HOUSE, ROYAL_FLUSH:
    					{
    						for(new i = 0; i < 5; i++)
    						{
    							PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
    						}
    					}
    					case TWO_PAIR:
    					{
    						for(new i = 0; i < 5; i++)
    						{
    							if(first == Card_Value[PP_Info[playerid][fivecards_hand][i]] ||
    								second == Card_Value[PP_Info[playerid][fivecards_hand][i]])
    							{
    								PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
    							}
    						}
    					}
    					case THREE_OF_A_KIND, FOUR_OF_A_KIND:
    					{
    						for(new i = 0; i < 5; i++)
    						{
    							if(first == Card_Value[PP_Info[playerid][fivecards_hand][i]])
    							{
    								PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdmid");
    							}
    						}
    					}
    				}
    				PlayerPlaySound(playerid, 5448, 0.00, 0.00, 0.00);
    				WinnText(playerid, win, rank);
    				BetCredit(playerid);
    			} else {
    				for(new i = 0; i < 5; i++)
    				{
    					PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
    				}
    			}
    		}
    	} else {
    		if(PP_Info[playerid][click_dealbutton] == SECOND_CLICKDEALTEXT)
    		{
    			for(new i = 0; i < 5; i++)
    			{
    				if(CARDSTEXT + PlayerText:i == playertextid)
    				{
    					PP_Info[playerid][holdstate][i] = HOLDOFF - PP_Info[playerid][holdstate][i];
    					if(PP_Info[playerid][holdstate][i])
    						PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "_");
    					else
    						PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
    					PlayerPlaySound(playerid, 21000, 0.00, 0.00, 0.00);
    					return 1;
    				}
    			}
    		}
    		else if(ADDCOINSTEXT == playertextid)
    		{
    			if(GetPlayerMoney(playerid) < 100)
    			{
    				SendClientMessage(playerid, -1, "{cc1212}You have no money.");
    			} else {
    				GivePlayerMoney(playerid, -100);
    				PP_Info[playerid][Credit] += 100;
    				BetCredit(playerid);
    				PlayerPlaySound(playerid, 4203, 0.00, 0.00, 0.00);
    			}
    			return 1;
    		}
    		else if(BETTEXT == playertextid)
    		{
    			if(PP_Info[playerid][Bet] < 100)
    				PP_Info[playerid][Bet]++;
    			else
    				PP_Info[playerid][Bet] = MIN_BET;
    
    			BetCredit(playerid);
    			WinnText(playerid);
    			PlayerPlaySound(playerid, 4202, 0.00, 0.00, 0.00);
    			return 1;
    		}
    	}
    
    	if(CHANGEBACKGROUND == playertextid)
    	{
    		PP_Info[playerid][LastBackGround]++;
    		if(PP_Info[playerid][LastBackGround] == sizeof BackGroundData)
    			PP_Info[playerid][LastBackGround] = 0;
    		PlayerTextDrawSetString(playerid, BACKGROUND, BackGroundData[PP_Info[playerid][LastBackGround]]);
    		return 1;
    	}
    
    	if(EXITPOKER == playertextid)
    	{
    		ExitPoker(playerid);
    		return 1;
    	}
    	return 1;
    }
    
    public
    	TextDrawDizajn(playerid, index)
    {
    	if(index == 5)
    	{
    		new
    			first,
    			second,
    			rank = get_rank(PP_Info[playerid][fivecards_hand]),
    			win = get_win(rank);
    		rankname(rank, first, second);
    		SetTimerEx("TextDrawDizajn2", 200, false, "iiiii", playerid, win, rank, first, second);
    	} else {
    		PlayerPlaySound(playerid, 20800, 0.00, 0.00, 0.00);
    		PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:index, "LD_POKE:cdback");
    		PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:index, " ");
    		SetTimerEx("TextDrawDizajn", 100, false, "ii", playerid, ++index);
    	}
    	return 1;
    }
    
    public
    	TextDrawDizajn2(playerid, win, rank, first, second)
    {
    	for(new i; i < 5; i++)
    	{
    		PlayerTextDrawSetString(playerid, CARDSTEXT + PlayerText:i, LD_POKE[PP_Info[playerid][fivecards_hand][i]]);
    	}
    	switch(win)
    	{
    		case STRAIGHT, FLUSH, STRAIGHT_FLUSH, FULL_HOUSE, ROYAL_FLUSH:
    		{
    			for(new i = 0; i < 5; i++)
    			{
    				PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
    				PP_Info[playerid][holdstate][i] = HOLDON;
    			}
    		}
    		case ONE_PAIR:
    		{
    			for(new i = 0; i < 5; i++)
    			{
    				if(first == Card_Value[PP_Info[playerid][fivecards_hand][i]])
    				{
    					PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
    					PP_Info[playerid][holdstate][i] = HOLDON;
    				}
    			}
    		}
    		case TWO_PAIR:
    		{
    			for(new i = 0; i < 5; i++)
    			{
    				if(first == Card_Value[PP_Info[playerid][fivecards_hand][i]] ||
    					second == Card_Value[PP_Info[playerid][fivecards_hand][i]])
    				{
    					PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
    					PP_Info[playerid][holdstate][i] = HOLDON;
    				}
    			}
    		}
    		case THREE_OF_A_KIND, FOUR_OF_A_KIND:
    		{
    			for(new i = 0; i < 5; i++)
    			{
    				if(first == Card_Value[PP_Info[playerid][fivecards_hand][i]])
    				{
    					PlayerTextDrawSetString(playerid, HOLDSTEXT + PlayerText:i, "LD_POKE:holdon");
    					PP_Info[playerid][holdstate][i] = HOLDON;
    				}
    			}
    		}
    	}
    	PP_Info[playerid][click_dealbutton] = SECOND_CLICKDEALTEXT;
    	WinnText(playerid, win, rank);
    	return 1;
    }
    
    stock
    	get_win(rank)
    {
    	if(rank > 6185)	return HIGH_CARD;			// 1277 high card
    	if(rank > 3325)	return ONE_PAIR;			// 2860 one pair
    	if(rank > 2467)	return TWO_PAIR;			// 858 two pair
    	if(rank > 1609)	return THREE_OF_A_KIND;	// 858 three-kind
    	if(rank > 1599)	return STRAIGHT;			// 10 straights
    	if(rank > 322)	return FLUSH;				// 1277 flushes
    	if(rank > 166)	return FULL_HOUSE;		// 156 full house
    	if(rank > 10)	return FOUR_OF_A_KIND;		// 156 four-kind
    	if(rank > 2)	return STRAIGHT_FLUSH;	// 9 straight-flushes
    	return ROYAL_FLUSH;
    }
    
    stock
    	get_rank(const cards[]) // fast five card hand eval 
    {
    	new
    		flushes = 0,
    		getcolor = Color_Mask[cards[0]] | Color_Mask[cards[1]] | Color_Mask[cards[2]] | Color_Mask[cards[3]] | Color_Mask[cards[4]];
    	if((getcolor & (getcolor - 1)) == 0)
    	{
    		switch(Bynary_Mask[cards[0]] | Bynary_Mask[cards[1]] | Bynary_Mask[cards[2]] | Bynary_Mask[cards[3]] | Bynary_Mask[cards[4]])
    		{
    			case 7936:	{ return 1; } // ROYAL_FLUSH;
    			case 4111:	{ return 2; } // Straight Flush
    			case 3968:	{ return 3; } // Straight Flush
    			case 1984:	{ return 4; } // Straight Flush
    			case 992:	{ return 5; } // Straight Flush
    			case 496:	{ return 6; } // Straight Flush
    			case 248:	{ return 7; } // Straight Flush
    			case 124:	{ return 8; } // Straight Flush
    			case 62:	{ return 9; } // Straight Flush
    			case 31:	{ return 10; } // Straight Flush
    			default: flushes = 5863;
    		}
    	}

  12. asa? ... am facut asa si imi apare pawn stoped working

    public OnPlayerModelSelection(playerid, response, listid, modelid)
    {
    	if(listid == gunlist)
    	{
    	    if(response)
    	    {
    	        	GivePlayerWeapon(playerid, 1-300, AMMO); // Brass Knuckles
    	        	GivePlayerWeapon(playerid, 2-300, AMMO); // Golf Club
    	        	GivePlayerWeapon(playerid, 3-300, AMMO); // Nightstick
    	        	GivePlayerWeapon(playerid, 4-300, AMMO); // Knife
    	        	GivePlayerWeapon(playerid, 5-300, AMMO);// Baseball Bat
    	        	GivePlayerWeapon(playerid, 6-300, AMMO);// Shovel
    	        	GivePlayerWeapon(playerid, 7-300, AMMO);// Pool Cue
        	        GivePlayerWeapon(playerid, 8-300, AMMO);// Katana
    	        	GivePlayerWeapon(playerid, 9-300, AMMO);// Chainsaw
    	        	GivePlayerWeapon(playerid, 10-300, AMMO);// Double-ended Dildo
    	        	GivePlayerWeapon(playerid, 14-300, AMMO);// Flowers
    	        	GivePlayerWeapon(playerid, 15-300, AMMO);// Cane
    	        	GivePlayerWeapon(playerid, 22-300, AMMO);// 9mm
    	        	GivePlayerWeapon(playerid, 23-300, AMMO);// Silenced 9mm
    	        	GivePlayerWeapon(playerid, 24-300, AMMO); // Desert Eagle
    	        	GivePlayerWeapon(playerid, 25-300, AMMO);// Shotgun
    	        	GivePlayerWeapon(playerid, 26-300, AMMO);// Sawnoff
    	        	GivePlayerWeapon(playerid, 28-300, AMMO);// Micro SMG/Uzi
    	        	GivePlayerWeapon(playerid, 29-300, AMMO);// MP5
    				GivePlayerWeapon(playerid, 31-300, AMMO)// M4
    	        	GivePlayerWeapon(playerid, 32-300, AMMO);// Tec-9
    	        	GivePlayerWeapon(playerid, 33-300, AMMO);// Country Rifle
    			}
    		    SendClientMessage(playerid, 0x33AA33AA, "The weapon is selected!");
    	    }
    	    else SendClientMessage(playerid, 0xFF0000FF, "You cancelled a weapon choice!");
        	return 1;
    	}
    	return 1;
    }

  13. am si eu un sistem de arme pt 0.3x dar cand dau compile... nu mi se complimenteaza dar... nu imi apare nimic.. nici o eroare

    //--------------------------[Defines]-----------------------------------------
    #define DIALOG_BG_COLOR 0x4A5A6BBB
    #define PREV_BG_COLOR 0x88888899
    #define PREV_BG_COLOR2 0xFFFF00AA 
    #define AMMO 100
    //------------------------------------------------------------------------------
    
    new gunlist = mS_INVALID_LISTID;
    
    if(strcmp(cmdtext, "/gunlist", true) == 0)
    	{
    	    ShowModelSelectionMenu(playerid, gunlist, "Select Gun", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2); // Ïîêàçûâàåì èãðîêó ìåíþ ñ âûáîðîì îðóæèÿ.
    	    return 1;
    	}
    	return 0;
    }
    public OnGunlistInit()
    {
    	gunlist = LoadModelSelectionMenu("gun.txt"); 
    	return 1;
    }
    
    public OnPlayerModelSelection(playerid, response, listid, modelid)
    {
    	if(listid == gunlist)
    	{
    	    if(response)
    	    {
    		    switch(modelid)
    			{
    	        	case 331: GivePlayerWeapon(playerid, 1, AMMO); // Brass Knuckles
    	        	case 333: GivePlayerWeapon(playerid, 2, AMMO); // Golf Club
    	        	case 334: GivePlayerWeapon(playerid, 3, AMMO); // Nightstick
    	        	case 335: GivePlayerWeapon(playerid, 4, AMMO); // Knife
    	        	case 336: GivePlayerWeapon(playerid, 5, AMMO); // Baseball Bat
    	        	case 337: GivePlayerWeapon(playerid, 6, AMMO); // Shovel
    	        	case 338: GivePlayerWeapon(playerid, 7, AMMO); // Pool Cue
    	        	case 339: GivePlayerWeapon(playerid, 8, AMMO); // Katana
    	        	case 341: GivePlayerWeapon(playerid, 9, AMMO); // Chainsaw
    	        	case 321: GivePlayerWeapon(playerid, 10, AMMO); // Double-ended Dildo
    	        	case 325: GivePlayerWeapon(playerid, 14, AMMO); // Flowers
    	        	case 326: GivePlayerWeapon(playerid, 15, AMMO); // Cane
    	        	case 342: GivePlayerWeapon(playerid, 16, AMMO); // Grenade
    	        	case 343: GivePlayerWeapon(playerid, 17, AMMO); // Tear Gas
    	        	case 344: GivePlayerWeapon(playerid, 18, AMMO); // Molotov Cocktail
    	        	case 346: GivePlayerWeapon(playerid, 22, AMMO); // 9mm
    	        	case 347: GivePlayerWeapon(playerid, 23, AMMO); // Silenced 9mm
    	        	case 348: GivePlayerWeapon(playerid, 24, AMMO); // Desert Eagle
    	        	case 349: GivePlayerWeapon(playerid, 25, AMMO); // Shotgun
    	        	case 350: GivePlayerWeapon(playerid, 26, AMMO); // Sawnoff
    	        	case 351: GivePlayerWeapon(playerid, 27, AMMO); // Combat Shotgun
    	        	case 352: GivePlayerWeapon(playerid, 28, AMMO); // Micro SMG/Uzi
    	        	case 353: GivePlayerWeapon(playerid, 29, AMMO); // MP5
    	        	case 355: GivePlayerWeapon(playerid, 30, AMMO); // AK-47
    	        	case 356: GivePlayerWeapon(playerid, 31, AMMO); // M4
    	        	case 372: GivePlayerWeapon(playerid, 32, AMMO); // Tec-9
    	        	case 357: GivePlayerWeapon(playerid, 33, AMMO); // Country Rifle
    	        	case 358: GivePlayerWeapon(playerid, 34, AMMO); // Sniper Rifle
    	        	case 359: GivePlayerWeapon(playerid, 35, AMMO); // RPG
    	        	case 360: GivePlayerWeapon(playerid, 36, AMMO); // HS Rocket
    	        	case 361: GivePlayerWeapon(playerid, 37, AMMO); // Flamethrower
    	        	case 362: GivePlayerWeapon(playerid, 38, AMMO); // Minigun
    	        	case 363: { GivePlayerWeapon(playerid, 39, AMMO); GivePlayerWeapon(playerid, 40, 1); }// Satchel Charge + Detonator
    	        	case 365: GivePlayerWeapon(playerid, 41, AMMO); // Spraycan
    	        	case 366: GivePlayerWeapon(playerid, 42, AMMO); // Fire Extinguisher
    			}
    		    SendClientMessage(playerid, 0x33AA33AA, "The weapon is selected!");
    	    }
    	    else SendClientMessage(playerid, 0xFF0000FF, "You cancelled a weapon choice!");
        	return 1;
    	}
    	return 1;
    }

  14. am bagat si eu acest sistem de gps... dar cand dau f5 nu imi apare nimic ... nici erori nici nimic..

    new GPSTimer[MAX_PLAYERS];
    new bool:HaveGPS[MAX_PLAYERS];
    forward GPSUpdate(playerid,playerid2);
    public GPSUpdate(playerid,playerid2){
    	if(IsPlayerConnected(playerid2)){
    		new Float:Distnace;
    		Distnace = GetDistanceBetweenPlayers(playerid,playerid2);
    		new Float:X,Float:Y,Float:Z;
    		GetPlayerPos(playerid2,X,Y,Z);
    		DisablePlayerCheckpoint(playerid);
    		SetPlayerCheckpoint(playerid,X,Y,Z,0.1);
    		new string[128];
    		format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~p~Distance: ~r~%.1f ~y~m",Distnace);
    		GameTextForPlayer(playerid, string, 1100, 5);
    		if(Distnace <= 4.0) {
    			DisablePlayerCheckpoint(playerid);
    			KillTimer(GPSTimer[playerid]);
    			HaveGPS[playerid] = false;
    			GPSTimer[playerid] = 0;
    		}
    	}else{
    		DisablePlayerCheckpoint(playerid);
    		KillTimer(GPSTimer[playerid]);
    		HaveGPS[playerid] = false;
    		GPSTimer[playerid] = 0;
    		SendClientMessage(playerid, 0xFF0000AA, "SERVER: Player disconnected.");
    	}
    	return 1;
    }
    
    public OnPlayerConnect(playerid)
    {
    	GPSTimer[playerid] = 0;
    	HaveGPS[playerid] = false;
    	SendClientMessage(playerid, 0xFFFFFFAA, "This server is running GPS by Jefff (/gps)");
    	return 1;
    }
    
    public OnPlayerDisconnect(playerid, reason)
    {
    	if(HaveGPS[playerid]) {
    		KillTimer(GPSTimer[playerid]);
    		HaveGPS[playerid] = false;
    		GPSTimer[playerid] = 0;
    	}
    	return 1;
    }
    
    public OnPlayerDeath(playerid, killerid, reason)
    {
    	if(HaveGPS[playerid]) {
    		KillTimer(GPSTimer[playerid]);
    		HaveGPS[playerid] = false;
    		GPSTimer[playerid] = 0;
    	}
    	return 1;
    }
    new cmd[64],tmp[64],idx;
    	cmd = strtok(cmdtext,idx);
    	if(!strcmp(cmd, "/gps", true))
    	{
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "Usage: /gps [playerid / off]");
    		if(!strcmp(tmp, "off", true)) {
    			if(HaveGPS[playerid]) {
    				KillTimer(GPSTimer[playerid]);
    				HaveGPS[playerid] = false;
    				GPSTimer[playerid] = 0;
    				DisablePlayerCheckpoint(playerid);
    				SendClientMessage(playerid, 0xFFFF00AA, "SERVER: GPS disabled.");
    			}else SendClientMessage(playerid, 0xFF0000AA, "SERVER: Your GPS isnt turned ON !");
    			return 1;
    		}
    		if(IsPlayerConnected(strval(tmp))) {
    			if(strval(tmp) != playerid) {
    				if(HaveGPS[playerid]) {
    					KillTimer(GPSTimer[playerid]);
    					HaveGPS[playerid] = false;
    					GPSTimer[playerid] = 0;
    				}
    				GPSTimer[playerid] = SetTimerEx("GPSUpdate", 500, true, "dd", playerid,strval(tmp));
    				HaveGPS[playerid] = true;
    				new str[128],nick[24];
    				GetPlayerName(strval(tmp),nick,24);
    				format(str,128,"SERVER: GPS enabled. Target: %s (ID: %d)",nick,strval(tmp));
    				SendClientMessage(playerid, 0xFFFF00AA, str);
    			}else SendClientMessage(playerid, 0xFF0000AA, "SERVER: You cant type your own ID !");
    		}else SendClientMessage(playerid, 0xFF0000AA, "SERVER: This ID isnt connected !");
    		return 1;
    	}
    	return 0;
    }

  15. am si eu asta

    if(strcmp(cmd, "/acreatecar", true) == 0)
    	{
    	    if(PlayerInfo[playerid][pLevel] < 3 || PlayerInfo[playerid][pAdmin] >= 1339)
    	    {
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new car;
    			car = strval(tmp);
    			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, " Vehicle Number can't be below 400 or above 611 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color1;
    			color1 = strval(tmp);
    			if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			tmp = strtok(cmdtext, idx);
    			if(!strlen(tmp))
    			{
    				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]");
    				return 1;
    			}
    			new color2;
    			color2 = strval(tmp);
    			if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; }
    			new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
                new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
    			CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
    			CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
    			PutPlayerInVehicle(playerid,thiscar,0);
    			strmid(CarInfo[vehid][cOwner], "No-one", 0, strlen("No-one"), 999);
    			format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
    			format(string, sizeof(string), "The car %s [%d] has been created",CarInfo[thiscar][cDescription],thiscar);
    			SendClientMessage(playerid, COLOR_BLUE, string);
    			ShowPlayerDialog(playerid,DIALOGIDSETOWNER,DIALOG_STYLE_INPUT,"{E0941B}Vehicle owner","Write playerid/PartOfName \nto make owner this car:","Enter","Close");
    		}
    		else
    		{
    		    SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
    			return 1;
    		}
    	}
    si vreau ca sa imi apara cv de genu
    if(PlayerInfo[giveplayerid][pPcarkey] == -1) { }
    					else { SendClientMessage(playerid, COLOR_GREY, "   That player allready created 1 car"); return 1; }

  16. am problema cu vechea poveste... dau /buyprods dar imi apare intr.una products 0/0 ...

    new PlayerHaul[500][pHaul];

    if(IsATruck(newcar))
    		{
    			format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
    			SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
    			SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
    			SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
    		}
    public IsATruck(carid)
    {
    	if(carid== TRUCK || carid== TRUCK2|| carid== TRUCK3 ||carid== TRUCK4)
    	{
    		return 1;
    	}
    	return 0;
    }
    stock IsATrailer(carid)
    {
    	if(carid== TRAILER || carid== TRAILER2 || carid== TRAILER3)
    	{
    		return 1;
    	}
    	return 0;
    }
    if(newcar == TRUCK || newcar == TRUCK2 || newcar == TRUCK3 || newcar == TRUCK4)
    		{
                if(PlayerInfo[playerid][pJob] == 14){ }
    		    else
    			{
    		        SendClientMessage(playerid,COLOR_GREY,"   You are not a Truker !");
    		        RemovePlayerFromVehicle(playerid);
    		    }
    		}
       	TRUCK = AddStaticVehicle(403,-59.3948,-1131.5742,1.6842,68.4991,0,0); // TRUCK
    	TRUCK2 = AddStaticVehicle(403,-61.0916,-1135.8716,1.6846,68.0794,0,0); // TRUCK1
    	TRUCK3 = AddStaticVehicle(403,-62.8802,-1140.0293,1.6849,67.3893,0,0); // TRUCK2
    	TRAILER = AddStaticVehicle(591,-78.3183,-1113.2704,0.8085,162.5001,0,0); // TRAILER
    	TRAILER2 = AddStaticVehicle(591,-72.8625,-1114.8864,0.8052,165.5299,0,0); // TRAILER1
    	TRAILER3 = AddStaticVehicle(591,-66.8893,-1116.2998,0.8052,163.0502,0,0); // TRAILER2
    	TRUCK4 = AddStaticVehicleEx(440,2782.9,-2455.6,13.4,90.8,-1,-1,60000);//81Component Truck/*Rumpo*/
    	PlayerHaul[TRAILER][pCapasity] = 500;
    	PlayerHaul[TRAILER2][pCapasity] = 500;
    	PlayerHaul[TRAILER3][pCapasity] = 500;
    	PlayerHaul[TRUCK4][pCapasity] = 250;
    if(strcmp(cmd, "/buyprods", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    		{
    			new tmpcar = GetPlayerVehicleID(playerid);
    			new compcost = 50;
    			if(PlayerToPoint(60.0, playerid, -78.9067,-1130.7458,0.6489))//2787.8,-2436.3,13.7
    			{
    				if(IsATruck(tmpcar))
    				{
    					if(PlayerHaul[tmpcar][pLoad] < PlayerHaul[tmpcar][pCapasity])
    					{
    					    new amount;
    					    tmp = strtok(cmdtext, idx);
    						if(!strlen(tmp))
    						{
    							SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /buyprods [amount]");
    							return 1;
    						}
    						amount = strval(tmp);
    						if(amount < 1 || amount > 500) { SendClientMessage(playerid, COLOR_GREY, "   Can't buy less then 1 Product or more then 500 !"); return 1; }
    						new check= PlayerHaul[tmpcar][pLoad] + amount;
    						if(check > PlayerHaul[tmpcar][pCapasity])
    						{
    						    format(string, sizeof(string), "   You went over the Truck Products Carry Limit of %d, you currently carry %d.",PlayerHaul[tmpcar][pCapasity],PlayerHaul[tmpcar][pLoad]);
    						    SendClientMessage(playerid, COLOR_GREY, string);
    						    return 1;
    						}
    						new cost = amount*compcost;
    						if(GetPlayerMoney(playerid) >= cost)
    						{
    							PlayerHaul[tmpcar][pLoad] += amount;
    							format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    							SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
    							format(string, sizeof(string), "You bought %d Products for $%d.", amount,cost);
    							SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
    							GivePlayerMoney(playerid,-cost);
    							PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    							return 1;
    						}
    						else
    						{
    							format(string, sizeof(string), "You cant afford %d Products at $%d !", amount,cost);
    							SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
    							return 1;
    						}
    					}
    					else
    					{
    							format(string, sizeof(string), "Products: %d/%d.", PlayerHaul[tmpcar][pLoad],PlayerHaul[tmpcar][pCapasity]);
    							SendClientMessage(playerid, TEAM_GroveStreet_COLOR, string);
    							return 1;
    					}
    				}
    				else
    				{
    					SendClientMessage(playerid, TEAM_GroveStreet_COLOR, "This Vehicle does not deliver Products.");
    					return 1;
    				}
    			}
    		}
    		return 1;
    	}

  17. PlayerHaul[TRAILER][pCapasity] = 500;

    PlayerHaul[TRAILER2][pCapasity] = 500;

    PlayerHaul[TRAILER3][pCapasity] = 500;

    PlayerHaul[TRUCK4][pCapasity] = 250;

    LoadCar();

    for(new h = carsonserver; h < sizeof(CarInfo); h++)

    {

    AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);

    } si aici

×
×
  • 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.