Jump to content

Papana

Membru
  • Posts

    334
  • Joined

  • Last visited

    Never

Posts posted by Papana

  1. Deci am facut o comanda de arme pe dialog

    dar vreau cand dau cancel sa nu-mi dea kick

    doar sa iasa din dialog.

    comanda

    if (strcmp("/buygun", cmdtext, true, 10) == 0)
    	{
            if(IsPlayerConnected(playerid))
    	    {
    		    if(GetPlayerCash(playerid) < 1)
    		    {
    		    	SendClientMessage(playerid, COLOR_GREY, "   You dont have enough money with you !");
    		    	return 1;
    		    }
    		    new location = PlayerInfo[playerid][pLocal];
    		    if(location == 99 || location == 100 || location == 102)
    		    {
    				ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    			else
    			{
    			SendClientMessage(playerid, COLOR_WHITE,"You are not in a store.");
    			return 1;
    			}
    		}
            return 1;
    	}
    dialogu
    if(dialogid == DIALOGAR) //
    	{
    		if(response)
    		{
       			if(listitem == 0) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+1, DIALOG_STYLE_LIST, "Pistoale Automate", "Micro SMG [$3000] \nSMG [$3500] \nAK47 [$3500] \nM4 [$3500] \nTec9 [$8500] \nBack", "Select", "Cancel");
    			}
    			if(listitem == 1) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+2, DIALOG_STYLE_LIST, "Pistoale", "9mm [$1500] \nSilenced 9mm [$1500] \nDeagle [$1500] \nBack", "Select", "Cancel");
    			}
    			if(listitem == 2) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+3, DIALOG_STYLE_LIST, " Arme cu Lunete", "Country Rifle [$3100] \nSniper Rifle [$6100] \nBack", "Select", "Cancel");
       			}
       			if(listitem == 3) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+4, DIALOG_STYLE_LIST, "Shotgun", "Shotgun [$2100] \nSawnoff Shotgun [$3100] \nCombat Shotgun [$2100] \nBack", "Select", "Cancel");
       			}
       			if(listitem == 4) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+5, DIALOG_STYLE_LIST, "Special", "Camera [$990] \nNightvision Goggles [$990] \nInfared Vision [$990] \nParachute [$990] \nBack", "Select", "Cancel");
       			}
       			if(listitem == 5) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+6, DIALOG_STYLE_LIST, "Arme Manuale", "Spraycan [$850] \nFire Extinguisher [$850] \nBack", "Select", "Cancel");
       			}
       			if(listitem == 6) // 
    			{
    				ShowPlayerDialog(playerid, DIALOGAR+7, DIALOG_STYLE_LIST, "Melee","Brass Knuckles [$550] \nGolf Club [$550] \nNite Stick [$550] \nKnife [$550] \nBaseball Bat [$550] \nShovel [$550] \nPool Cue [$550] \nKatana [$550] \nChainsaw [$550] \nPurple Dildo [$550] \nSmall White Vibrator [$550] \nLarge White Vibrator [$550] \nSilver Vibrator [$550] \nFlowers [$550] \nCane [$550] \nBack", "Select", "Cancel");
       			}
    		}
    		return 1;
    	}
    
    	if(dialogid == DIALOGAR+1) //
    	{
    		if(response)
    		{
    			if(listitem == 0) // Micro-SMG
    			{
    				GivePlayerWeapon(playerid,28, 300);
    				GivePlayerCash(playerid, -3000);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Micro-SMG.");
    			}
    			if(listitem == 1) //SMG
    			{
    				GivePlayerWeapon(playerid,29, 300);
    				GivePlayerCash(playerid, -3500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat SMG.");
    			}
    			if(listitem == 2) // AK47
    			{
    				GivePlayerWeapon(playerid,30, 300);
    				GivePlayerCash(playerid, -3500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat AK47.");
    			}
    			if(listitem == 3) // M4
    			{
    				GivePlayerWeapon(playerid,31, 300);
    				GivePlayerCash(playerid, -3500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat M4.");
    			}
    			if(listitem == 4) // Tec9
    			{
    				GivePlayerWeapon(playerid,32, 300);
    				GivePlayerCash(playerid, -8500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Tec9.");
    			}
    			if(listitem == 5) // Back
      			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    
    	if(dialogid == DIALOGAR+2) //
    	{
    		if(response)
    		{
    			if(listitem == 0) // 9mm
    			{
    				GivePlayerWeapon(playerid,22, 300);
    				GivePlayerCash(playerid, -1500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle 9mm.");
    			}
    			if(listitem == 1) // Silenced 9mm
    			{
    				GivePlayerWeapon(playerid,23, 300);
    				GivePlayerCash(playerid, -1500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle Silenced 9mm.");
    			}
    			if(listitem == 2) // Deagle
    			{
    				GivePlayerWeapon(playerid,24, 300);
    				GivePlayerCash(playerid, -1500);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Deagle.");
    			}
    			if(listitem == 3) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    
    	if(dialogid == DIALOGAR+3) // Rifles
    	{
    		if(response)
    		{
    			if(listitem == 0) // Country Rifle
    			{
    				GivePlayerWeapon(playerid,33, 300);
    				GivePlayerCash(playerid, -3100);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Country Rifle.");
    			}
    			if(listitem == 1) // Sniper Rifle
    			{
    				GivePlayerWeapon(playerid,34, 300);
    				GivePlayerCash(playerid, -6100);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Sniper Rifle.");
    			}
    			if(listitem == 2) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    	if(dialogid == DIALOGAR+4) // Shotguns
    	{
    		if(response)
    		{
    			if(listitem == 0) // Shotgun
    			{
    				GivePlayerWeapon(playerid,25, 300);
    				GivePlayerCash(playerid, -2100);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Shotgun.");
    			}
    			if(listitem == 1) // Sawnoff Shotgun
    			{
    				GivePlayerWeapon(playerid,26, 300);
    				GivePlayerCash(playerid, -3100);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Sawnoff Shotgun.");
    			}
    			if(listitem == 2) // Combat Shotgun
    			{
    				GivePlayerWeapon(playerid,27, 300);
    				GivePlayerCash(playerid, -2100);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Combat Shotgun.");
    			}
    			if(listitem == 3) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    	if(dialogid == DIALOGAR+5) // Special
    	{
    		if(response)
    		{
    			if(listitem == 0) // Camera
    			{
    				GivePlayerWeapon(playerid,43, 300);
    				GivePlayerCash(playerid, -990);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Camera.");
    			}
    			if(listitem == 1) // Nightvision Goggles
    			{
    				GivePlayerWeapon(playerid,44, 300);
    				GivePlayerCash(playerid, -990);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Nightvision Goggles.");
    			}
    			if(listitem == 2) // Infared Vision
    			{
    				GivePlayerWeapon(playerid,45, 300);
    				GivePlayerCash(playerid, -990);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Infared Vision.");
    			}
    			if(listitem == 3) // Parachute
    			{
    				GivePlayerWeapon(playerid,46, 300);
    				GivePlayerCash(playerid, -990);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Parachute.");
    			}
    			if(listitem == 4) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    	if(dialogid == DIALOGAR+6) // Hand Held
    	{
    		if(response)
    		{
    			if(listitem == 0) // Spraycan
    			{
    				GivePlayerWeapon(playerid,41, 300);
    				GivePlayerCash(playerid, -850);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Spraycan.");
    			}
    			if(listitem == 1) // Fire Extinguisher
    			{
    				GivePlayerWeapon(playerid,42, 300);
    				GivePlayerCash(playerid, -850);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Fiera Extinguisher.");
    			}
    			if(listitem == 2) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}
    	if(dialogid == DIALOGAR+7) // Melee
    	{
    		if(response)
    		{
    			if(listitem == 0) // Brass Knuckles
    			{
    				GivePlayerWeapon(playerid,1, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Brass Knuckles.");
    			}
    			if(listitem == 1) // Golf Club
    			{
    				GivePlayerWeapon(playerid,2, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Golf Club.");
    			}
    			if(listitem == 2) // Nite Stick
    			{
    				GivePlayerWeapon(playerid,3, 300);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Nite Stick.");
    			}
    			if(listitem == 3) // Knife
    			{
    				GivePlayerWeapon(playerid,4, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Knife.");
    			}
    			if(listitem == 4) // Baseball Bat
    			{
    			    GivePlayerWeapon(playerid,5, 300);
    			    GivePlayerCash(playerid, -550);
    			    SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Baseball Bat");
    			}
    			if(listitem == 5) // Shovel
    			{
    				GivePlayerWeapon(playerid,6, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Shovel");
    			}
    			if(listitem == 6) // Pool Cue
    			{
    				GivePlayerWeapon(playerid,7, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Pool Cue");
    			}
    			if(listitem == 7) // Katana
    			{
    				GivePlayerWeapon(playerid,8, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Katana");
    			}
    			if(listitem == 8) // Chainsaw
    			{
    				GivePlayerWeapon(playerid,9, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Chainsaw");
    			}
    			if(listitem == 9) // Purple Dildo
    			{
    				GivePlayerWeapon(playerid,10, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Purple Dildo");
    			}
    			if(listitem == 10) // Small White Vibrator
    			{
    				GivePlayerWeapon(playerid,11, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Small White Vibrator");
    			}
    			if(listitem == 11) // Large White Vibrator
    			{
    			    GivePlayerWeapon(playerid,12, 300);
    			    GivePlayerCash(playerid, -550);
    			    SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Large White Vibrator");
    			}
    			if(listitem == 12) // Silver Vibrator
    			{
    				GivePlayerWeapon(playerid,13, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Silver Vibrator");
    			}
    			if(listitem == 13) // Flowers
    			{
    				GivePlayerWeapon(playerid,14, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Flowers");
    			}
    			if(listitem == 14) // Cane
    			{
    				GivePlayerWeapon(playerid,15, 300);
    				GivePlayerCash(playerid, -550);
    				SendClientMessage(playerid, COLOR_YELLOW, "Ai cumparat Cane");
    			}
    			if(listitem == 15) // Back
    			{
                    ShowPlayerDialog(playerid, DIALOGAR, DIALOG_STYLE_LIST, "Meniu Arme", "Arme Automate\nPistoale\nArme cu Lunete \nShotgun \nSpecial\nArme Manuale \nMelee", "Select", "Cancel");
    			}
    		}
    		return 1;
    	}

    deci ma puteti ajuta

  2. nu merge ... tot asa imi da

    facui asa cum zisasi

      else
                {
                    format(string, sizeof(string), "   %d nu este online.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                }
            }
            return 1;
        }
     return 0;
    }

    incercai sa fac tutorialu ala

    dar imi da o groaza de erorii

    fami tu si punemi

    ,multumesc ca ma ajuti

  3. Nu intelesai deloc

    nici macar nu am return 0

    vazui doar ca se pune sub ultima comanda

    dar sa sterg un return 0

    dar eu nici nu am ..

    uitati ultimele randuri din onplayercommandtext

    			else
    			{
    				format(string, sizeof(string), "   %d nu este online.", giveplayerid);
    				SendClientMessage(playerid, COLOR_GRAD1, string);
    			}
    		}
    		return 1;
    	}
     return 1;
    }

    si care e problema nici macar nu merge buygun cand scriu

    imi da direct comanda necuscuta

    si dupa nu mai merge nicio comanda

  4. Deci am comanda /buygun

    si nu merge

    cand scriu /buygun

    imi da uncknou comand...

    si dupaia nu mai merge nicio comanda

    uitati aici comanda

    if (strcmp(cmd, "/buygun", true) == 0)
    	{
    	    if(IsPlayerConnected(playerid))
    	    {
    	        if(GetPlayerCash(playerid) < 1)
    			{
    			    SendClientMessage(playerid, COLOR_GREY, "   You dont have enough money with you !");
    			    return 1;
    			}
    			new gun;
    			new gunid[16];
    			new gunstring1[256];
    			new gunstring2[256];
    			new gunstring3[256];
    			new gunstring4[256];
    			new gunstring5[256];
    			new infostring[256];
    			new guncharge;
    			new ammocharge;
    			new location = PlayerInfo[playerid][pLocal];
    			if(location == 99 || location == 100 || location == 102)
    			{
    			    if(BizzInfo[location-99][bProducts] <= 0)
    			    {
    			        GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
    					return 1;
    			    }
    				new mod = 100;
    				tmp = strtok(cmdtext, idx);
    				if(!strlen(tmp))
    				{
    					format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
    					SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    					SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
    					SendClientMessage(playerid, COLOR_GRAD2,string);
    					format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
    					GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
    					SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
    					format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
    					GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
    					SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
    					format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
    					GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod);
    					SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
    					format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
    					GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
    					SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
    					format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
    					GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
    					SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
    					SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    					return 1;
    				}
    				strmid(gunid, tmp, 0, strlen(cmdtext), 255);
    				tmp = strtok(cmdtext, idx);
    				if(!strlen(tmp))
    				{
    					format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
    					return 1;
    				}
    				new ammo = strval(tmp);
    				if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, "   Ammo ammount not lower then 1 or higher then 999 !"); return 1; }
    				if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
    				{
    					gun = 46;
    					guncharge = GunPrice[0][0]/100*mod;
    					ammocharge = 0;
    				}
    				else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
    				{
    					gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 2; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
    				{
    					gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 3; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
    				{
    					gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 5; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
    				{
    					gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 6; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
    				{
    					gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 7; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
    				{
    					gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 10; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
    				{
    					gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 11; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
    				{
    					gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 12; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
    				{
    					gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 13; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
    				{
    					gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 14; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
    				{
    					gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0;
    					//PlayerInfo[playerid][pGun1] = 15; PlayerInfo[playerid][pAmmo1] = 1;
    				}
    				else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
    				{
    					gun = 23; guncharge = GunPrice[13][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
    					//PlayerInfo[playerid][pGun2] = 23; PlayerInfo[playerid][pAmmo2] = ammo;
    				}
    				else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
    				{
    					gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
    					//PlayerInfo[playerid][pGun2] = 24; PlayerInfo[playerid][pAmmo2] = ammo;
    				}
    				else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
    				{
    					gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo;
    					//PlayerInfo[playerid][pGun3] = 29; PlayerInfo[playerid][pAmmo3] = ammo;
    				}
    				else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
    				{
    					gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo;
    					//PlayerInfo[playerid][pGun3] = 25; PlayerInfo[playerid][pAmmo3] = ammo;
    				}
    				else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
    				{
    					gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
    					//PlayerInfo[playerid][pGun4] = 30; PlayerInfo[playerid][pAmmo4] = ammo;
    				}
    				else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
    				{
    					gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
    					//PlayerInfo[playerid][pGun4] = 31; PlayerInfo[playerid][pAmmo4] = ammo;
    				}
    				else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
    				{
    					gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
    					//PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo;
    				}
    				else
    				{
    					SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper zice: {FFAF00}I have never heard of that weapon.");
    					return 1;
    				}
    				if((guncharge+ammocharge) > GetPlayerCash(playerid))
    				{
    					format(infostring, 256, "   You don't have $%d !",guncharge+ammocharge);
    					SendClientMessage(playerid, COLOR_GRAD3, infostring);
    					return 1;
    				}
    				if(GetPlayerCash(playerid) < (guncharge+ammocharge))
    				{
    				    SendClientMessage(playerid, COLOR_GREY, "   Can't afford that !");
    				    return 1;
    				}
    				new payout = guncharge + ammocharge;
    				format(infostring, 256, "You have purchased %s with %d ammo for $%d",gunid,ammo,payout);
    				SendClientMessage(playerid, COLOR_GRAD3, infostring);
    				if(location == 102 && IsACop(playerid)) { }
    				else { GivePlayerCash(playerid, - payout); }
    				BizzInfo[location-99][bTill] += payout;
    				ExtortionBiz(location-99, payout);
    				BizzInfo[location-99][bProducts]--;
    				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    				SafeGivePlayerWeapon(playerid, gun, ammo);
    				GetPlayerName(playerid, sendername, sizeof(sendername));
    				format(string, sizeof(string), "%s bought weapons for $%d at biz %d", sendername, payout, location-99);
    				printf("%s", string);
    				PayLog(string);
    			}
    			else
    			{
    			    SendClientMessage(playerid, COLOR_WHITE,"You are not in a store.");
    				return 1;
    			}
    		}
    		return 1;
    	}

  5. Vreau sa fac comanda de la porti sa o fac sa fie de pe claxon fara comanda.

    de pe h/caps lock

    uitati comanda 

    if(strcmp(cmd, "/opengate", true) == 0 || strcmp(cmd, "/og", true) == 0)
        {
    	    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(10.0, playerid, 1542.3541,-1627.5516,13.3828))
                {
    		        SetObjectRot(barrierls, 0, 0, 270);
                    SetTimer("GateTime" ,3000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(10.0, playerid, 2238.5105,2454.0935,10.8203))
                {
                    SetObjectRot(barrierlv, 0, 0, 90);
                    SetTimer("GateTime1" ,3000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(20.0, playerid,3276.703125,-778.546447,11.071708))
                {
                    MoveObject(barierayd, 3273.603271,-766.213378, -7, 5);
                    SetTimer("GarageYard" ,2000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(10.0, playerid, 1589.0651,-1636.4768,13.4254))
                {
                    MoveObject(garagels, 1588.3868,-1638.2165, -7, 5);
                    SetTimer("GarageLS" ,3000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(10.0, playerid, 2334.4844,2444.3457,5.6337))
                {
                    MoveObject(garagelv, 2335.2814,2444.1799, -7, 5);
                    SetTimer("GarageLV" ,3000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
            }
            if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(10.0, playerid, 2292.9104,2499.2024,3.4907))
                {
                    MoveObject(garagelv1, 2294,2498.5915, -4.5, 5);
                    SetTimer("GarageLV1" ,3000 ,false);
                    SendClientMessage(playerid, COLOR_GRAD6,"** Poarta s-a deschis, se v-a inchide in 4 secunde !");
                    return 1;
                }
    		    else
                SCM(playerid, COLOR_GRAD4,"** You are not the destination for open the gate.");
                return 1;
            }
    		return 1;
    	}

    Si cine imi poate da si mie fs-u pentru a,atasa armele de corp...

    Eu nu-l gasesc

  6. Reply #7 on: Yesterday at 11:22:08 PM »

    on: Today at 03:05:38 PM »

    uitete la data desteptule

    unu e facut ieri altu e facut azi

    tu ai facut pentru +1

    asta e decizia unui moderator nu a ta

    nu te mai bagat daca nu poti oferi ajutor

    deci am adaugat

    #include "../include/gl_common.inc"

    a trebuit sa sterg cateva define care le definisam si am ajuns la eroarea asta

    ../include/gl_common.inc(194) : error 021: symbol already defined: "ReturnUser"

    dar acum nu reusesc sa-mi dau seama cum sa o rezolv

    linia194 in include nici macar nu exista..

    am rezolvat

    a trebuit sa sterg

    stock ReturnUser(text[])

    {

    new pos = 0;

    new userid = RETURN_USER_FAILURE;

    while(text[pos] < 0x21) { // Strip out leading spaces

    if(text[pos] == 0) return RETURN_USER_FAILURE; // No passed text

    pos++;

    }

    if(isNumeric(text[pos])) { // Check whole passed string

    userid = strval(text[pos]);

    if(userid >=0 && userid < MAX_PLAYERS)

    {

    if(IsPlayerConnected(userid)) return userid;

    return RETURN_USER_FAILURE;

    }

    }

    // They entered [part of] a name or the id search failed (check names just incase)

    new len = strlen(text[pos]);

    new count = 0;

    new name[MAX_PLAYER_NAME+1];

    for(new i = 0; i < MAX_PLAYERS; i++)

    {

    if(IsPlayerConnected(i))

    {

    GetPlayerName(i, name, sizeof(name));

    if(strcmp(name, text[pos], true, len) == 0) // Check segment of name

    {

    if(len == strlen(name)) { // Exact match

    return i;

    }

    else { // Partial match

    count++;

    userid = i;

    }

    }

    }

    }

    if(!count) return RETURN_USER_FAILURE;

    if(count > 1) return RETURN_USER_MULTIPLE;

    return userid;

    }

    din gl comon.inc

    din include din gamemodes

  7. deci am sters

    new strtok;
    am adaugat urmatorul
    stock strtok(const string[], &idx)
    {
        new length = strlen(string);
    	while ((idx < length) && (string[idx] <= ' '))
    	{
    		idx++;
    	}
    	new offset = idx;
    	new result[128];
    	while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    	{
    		result[idx - offset] = string[idx];
    		idx++;
    	}
    	result[idx - offset] = EOS;
    	return result;
    }
    si imi da eroarile astea
    \gamemodes\PG.pwn(26006) : error 047: array sizes do not match, or destination array is too small
    \gamemodes\PG.pwn(26396) : error 047: array sizes do not match, or destination array is too small
    \gamemodes\PG.pwn(27021) : error 047: array sizes do not match, or destination array is too small
    
    linia 26006
    x_nr = strtok(cmdtext, idx);
    linia 26396
    x_nr = strtok(cmdtext, idx);
    linia 27021
    x_nr = strtok(cmdtext, idx);
    iar daca pun
    strtok(const stringstrtok[], &index)
    {
        new length = strlen(stringstrtok);
        while ((index < length) && (stringstrtok[index] <= ' ')) { index++; }
    
        new offset = index, result[20];
        while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
        {
            result[index - offset] = stringstrtok[index];
            index++;
        }
        result[index - offset] = EOS;
        return result;
    }

    da eroare la pawno

  8. am adaugat

    strtok(const stringstrtok[], &index)
    {
    	new length = strlen(stringstrtok);
    	while ((index < length) && (stringstrtok[index] <= ' ')) { index++; }
    
    	new offset = index, result[20];
    	while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    	{
    		result[index - offset] = stringstrtok[index];
    		index++;
    	}
    	result[index - offset] = EOS;
    	return result;
    }

    dar imi da eroare la pawno

  9. if(Pcomm[playerid] == 1 && PlayerInfo[playerid][pAdmin] == 0)
       	{
        	SendClientMessage(playerid, COLOR_YELLOW, "[AntiSpam] {FFFFFF}Asteapta 2 secunde!");
        	return 1;
       	}
       	Pcomm[playerid] = 1;
        SetTimerEx("AntiChatSpam", 1000, false, "i", playerid);
        dcmd(specplayer, 10, cmdtext);
        dcmd(specoff, 7, cmdtext);
    	new string[2048];
    	new playermoney;
    	new sendername[MAX_PLAYER_NAME];
    	new giveplayer[MAX_PLAYER_NAME];
    	new playername[MAX_PLAYER_NAME];
    	new cmd[256];
    	new tmp[256];
    	new giveplayerid, moneys, glasseid, skin, idx, id;
    	new idcar = GetPlayerVehicleID(playerid);
    	new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
           cmd = strtok(cmdtext, idx);
    eu inainte de erorile astea am avut altele pentru  undefined strtok si am pus un
    new strtok;

    dar sus la toate new-urile

  10. daca pun imi apare altele

    gamemodes\PG.pwn(22080) : error 012: invalid function call, not a valid address
    gamemodes\PG.pwn(22080) : warning 215: expression has no effect
    gamemodes\PG.pwn(22080) : error 017: undefined symbol "params"
    gamemodes\PG.pwn(22080) : error 029: invalid expression, assumed zero
    gamemodes\PG.pwn(22080) : fatal error 107: too many error messages on one line

  11. Ma poate ajuta cineva

    gamemodes\PG.pwn(22080) : error 012: invalid function call, not a valid address
    gamemodes\PG.pwn(22080) : warning 215: expression has no effect
    gamemodes\PG.pwn(22080) : warning 215: expression has no effect
    gamemodes\PG.pwn(22080) : error 001: expected token: ";", but found ")"
    gamemodes\PG.pwn(22080) : error 029: invalid expression, assumed zero
    gamemodes\PG.pwn(22080) : fatal error 107: too many error messages on one line
    Linia 22080
    cmd = strtok(cmdtext, idx);

  12. Deci stiu ca erau niste tutoriale dar nu le-am gasit despre

    1.cum pun mersul normal care-l folosesc toti,in gm il am pe ce-l cracinat ...nustiu cum sa-i zic.

    2.cum pot pune cand iti alegi nicku sa-l alegi cum vrei nu sa fie obligatoriu, exemplu  papana_papy

    Folosesc un gm rp

  13. am reusit cu include-urile de la pawno sa rezolvat numai imi da erori

    dar acum cand incerc sa pornesc serveru nu merge ...

    dau sa-l pornesc si iar imediat din el

    edit sa rezolvat...

    nota 10/10 pentru gm

    e foarte frumos

    si bine facut

    bvv

    deci sistemu de case nu e bine facut fi atent

    poti cumpara cate case vrea un player,

    nu merge comanda /intra

    sistemu de bizuri merge dar daca faci multe nu mai arata bine text 3d si vad ca se cam incurca intre ele ..

    sistemu de masini merge bine .. bv

    doar comanda /mycars nu merge dar asta se face ..

  14. gireada tot imi apar

    D:\sa-mp\Server Role-Play\pawno\include\dutils.inc(21) : error 074: #define pattern must start with an alphabetic character
    D:\sa-mp\Server Role-Play\gamemodes\GM2.pwn(2130) : warning 225: unreachable code

    daca zici ca le-ai rezolvat nu mi le poti da ...

    eu am descarcat ultima versiune pe care ai puso

    m-am reapucat de scripting si vreau sa scriptez pe un gm pana invat calumea ca sa mi-l fac pe al meu ..

  15. #include "progress" il am

    iar petru a doua

    public OnPlayerDeath(playerid, killerid, reason)
    {
        new string[256];
    	if(PlayerInfo[playerid][Membru] == 1)
    	{
    	    AntiDeAMX();
            PlayerInfo[killerid][Wanted] += 4;
            SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
            SetPlayerWantedLevel(killerid, PlayerInfo[playerid][Wanted]+4);
            SendClientMessage(killerid, WHITE, "Ai omorat un om al legii, ti-sau mai adaugat inca 4 puncte de cautare.");
            return 1;
        }
        else
        {
            PlayerInfo[killerid][Asasinari] += 1;
            PlayerInfo[playerid][Decese] += 1;
            SetPlayerPos(playerid,209.3314,-34.0742,1001.9297);
            GivePlayerMoneyEx(playerid, -100);
            SendClientMessage(playerid, WHITE, "Factura medicala este de 100$.");
            SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
            return 1;
        }
        if(EventStatus == true)
        {
    	    if(playerid == TradatorID)
    		{
    		    if(killerid != playerid)
    		    {
    		    	GivePlayerMoneyEx(killerid,1000);
    		    	format(string, sizeof(string), " [Server-Event]: %s[%d] a omorat tradatotrul %s si a castigat 1000$", pName(killerid), killerid, pName(TradatorID));
    		    	SendClientMessageToAll(0xFFFFFFFF, string);
    		    	EventStatus = false;
    		    	TradatorID = -1;
    		  		SetTimer("EventTradator", 2340000, 0);//30 minute
    		  	}
    		  	else
    		  	{
    		  	    format(string, sizeof(string), " [Server-Event]: Tradatotrul %s s-a omorat singur",pName(TradatorID));
    		    	SendClientMessageToAll(0xFFFFFFFF, string);
    		    	EventStatus = false;
    		    	TradatorID = -1;
    		  		SetTimer("EventTradator", 2340000, 0);//30 minute
    		    }
    		}
    	}
    	return 1;
    }

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