Jump to content

Viorel

Membru
  • Posts

    28
  • Joined

  • Last visited

    Never

Posts posted by Viorel

  1. am si eu o problema am pus niste masini in cars.cfg dar nu mi le citeste pe sv , adica nu imi apar nu imi spawneaza masina

    am pus load

    public LoadCar()
    {
    	new arrCoords[13][64];
    	new strFromFile2[256];
    	new File: file = fopen("cars.cfg", io_read);
    	if (file)
    	{
    		new idx = 1;
    		while (idx < sizeof(CarInfo))
    		{
    			fread(file, strFromFile2);
    			split(strFromFile2, arrCoords, ',');
    			CarInfo[idx][cModel] = strval(arrCoords[0]);
    			CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
    			CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
    			CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
    			CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
    			CarInfo[idx][cColorOne] = strval(arrCoords[5]);
    			CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
    			strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255);
    			strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255);
    			CarInfo[idx][cValue] = strval(arrCoords[9]);
    			CarInfo[idx][cLicense] = strval(arrCoords[10]);
    			CarInfo[idx][cOwned] = strval(arrCoords[11]);
    			CarInfo[idx][cLock] = strval(arrCoords[12]);
    			printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]);
    			idx++;
    		}
    	}
    	return 1;
    }
    iar in cars.cfg
    426,2136.066406,-1147.109741,24.308074,45.536212,-1,-1,Dealership,Premier,50000,,0,0
    426,2136.342773,-1142.129638,24.845478,47.008613,-1,-1,Dealership,Premier,50000,,0,0
    426,2136.207519,-1137.549072,25.332399,46.329101,-1,-1,Dealership,Premier,50000,,0,0
    426,2136.213623,-1132.720581,25.431499,45.670898,-1,-1,Dealership,Premier,50000,,0,0
    426,2118.550537,-1148.575195,24.124799,302.684814,-1,-1,Dealership,Premier,50000,,0,0
    426,2118.054931,-1144.129882,24.465200,303.027893,-1,-1,Dealership,Premier,50000,,0,0
    426,2118.329101,-1139.004638,24.793920,306.577026,-1,-1,Dealership,Premier,50000,,0,0

    de ce oare?

  2. Am o problema is si alte topicuri stiu si inca unu e facut de mine cu aceasta intrebare dar nu pot so rezolv nicicum

    Deci eu vreau ca masina sa nu se respawneze deloc ....

    am pus

    "AddStaticVehicleEx"

    "AddStaticVehicle"

    "CreateVehicle"

    cu nici una de mai sus nu a mers

    am sters de la sfarsit timpul , am facut o chestie

    new never = 99999999999999999999;

    care dupa lam pus la sfarsit in loc de timp dar tot nu reusesc so opresc din respawn

  3. cauti in mod :

    if (realchat)

    si o inlocuiesti cu asta

    
    	if (realchat)
    	{
    	    if(gPlayerLogged[playerid] == 0)
    	    {
    	        return 0;
          	}
    		GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "%s [ID: %d] Says: %s", sendername, playerid, text);
    		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    		PlayerInfo[playerid][pPoint] += 1;
    		return 0;
    	}
    
    

  4. Incearca asa , am scis la fiecare de ce e asa

    Si daca nu e bine fa un postreply sau edit si scrie la e folosesti aia si mai mutle detalii

    public OnPlayerEnterRaceCheckpoint(playerid)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    SetPlayerPos(playerid, -294.9171,1538.8501,75.5671);
    DestroyVehicle(i);
    DisablePlayerRaceCheckpoint(playerid);
    
    
    sau poti pune asta in loc de destroy
    	SetVehicleToRespawn(carid); in loc de carid pui id de la masina
    

  5. Poi man , nu vreau sa il folosesc , mia zis prietenu meu ca nu pot sa gasesc cum a facut , si eu va intreb !

    Cum a facut sa nu gasesc numele mapei ! Ca as vrea sa folosesc si eu metoda ca am si eu moduri care nu vreau sa fie piratate !

  6. Am si eu o nelamurire .... , imi tot arata un prieten ca la el la gamemod nu poti schimba numele de la mapa !

    daka modificai cu /rcon mergea pana la restart !

    Am cautat in mod numele de la mapa dar nu o gasesc , e de la mod ca daca il schimb se schimba si numele la mapa!

    Concluzie : cum a facut sa aiba nume la mapa fara sa o gasesc in mod ! si am ceva timp de cand sciptez dar asta ma dat pe spate !!

  7. uite sa fiu direct asa numi da error :

    new GunNames[][32] = {
    	{"Unarmed (Fist)"},
    	{"Brass Knuckles"},
    	{"Golf Club"},
    	{"Night Stick"},
    	{"Knife"},
    	{"Baseball Bat"},
    	{"Shovel"},
    	{"Pool Cue"},
    	{"Katana"},
    	{"Chainsaw"},
    	{"Purple Dildo"},
    	{"Big White Vibrator"},
    	{"Medium White Vibrator"},
    	{"Small White Vibrator"},
    	{"Flowers"},
    	{"Cane"},
    	{"Grenade"},
    	{"Teargas"},
    	{"Molotov"},
    	{" "},
    	{" "},
    	{" "},
    	{"Colt 45"},
    	{"Silenced Pistol"},
    	{"Desert Eagle"},
    	{"Normal Shotgun"},
    	{"Sawnoff Shotgun"},
    	{"Combat Shotgun"},
    	{"Micro Uzi (Mac 10)"},
    	{"MP5"},
    	{"AK47"},
    	{"M4"},
    	{"Tec9"},
    	{"Country Rifle"},
    	{"Sniper Rifle"},
    	{"Rocket Launcher"},
    	{"Heat-Seeking Rocket Launcher"},
    	{"Flamethrower"},
    	{"Minigun"},
    	{"Satchel Charge"},
    	{"Detonator"},
    	{"Spray Can"},
    	{"Fire Extinguisher"},
    	{"Camera"},
    	{"Night Vision Goggles"},
    	{"Infrared Vision Goggles"},
    	{"Parachute"},
    	{"Fake Pistol"}
    };
    
    public AntiHack()
    {
    	new name[24];
    	new weapon;
    	new gunammo;
    	new string[256];
    	for (new i = 0; i <MAX_PLAYERS; i++)
    	{
    	    for (new w = 0; w <MAX_PLAYERS; w++)
    	    {
    	        GetPlayerWeaponData(i, w, weapon, gunammo);
    	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
    	        {
    		        GetPlayerName(i, name, sizeof(name));
    	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames[weapon]);
    	            SendClientMessageToAll(COLOR_RED, string);
    	            Ban(i);
    	            BanLog(string);
    			}
    		}
    	}
    	return 1;
    }
    
    public JetPackCheck()
    {
    	for(new i = 0; i <MAX_PLAYERS; i++)
    	{
    	    if(IsPlayerConnected(i))
    	    {
    	        if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
    	        {
    	            new string[128];
    	            new name[24];
    	            GetPlayerName(i, name, sizeof(name));
    	            format(string, sizeof(string), "[Anti-Hack] %s a fost anat din cauza hack-ului de jetkpack!", name);
    	            SendClientMessageToAll(COLOR_RED, string);
    	            Ban(i);
    	            BanLog(string);
    			}
    		}
    	}
    	return 1;
    }
    //===========================================================================// Cu textul asa
    new GunNames()[32] = {
    	{"Unarmed (Fist)"},
    	{"Brass Knuckles"},
    	{"Golf Club"},
    	{"Night Stick"},
    	{"Knife"},
    	{"Baseball Bat"},
    	{"Shovel"},
    	{"Pool Cue"},
    	{"Katana"},
    	{"Chainsaw"},
    	{"Purple Dildo"},
    	{"Big White Vibrator"},
    	{"Medium White Vibrator"},
    	{"Small White Vibrator"},
    	{"Flowers"},
    	{"Cane"},
    	{"Grenade"},
    	{"Teargas"},
    	{"Molotov"},
    	{" "},
    	{" "},
    	{" "},
    	{"Colt 45"},
    	{"Silenced Pistol"},
    	{"Desert Eagle"},
    	{"Normal Shotgun"},
    	{"Sawnoff Shotgun"},
    	{"Combat Shotgun"},
    	{"Micro Uzi (Mac 10)"},
    	{"MP5"},
    	{"AK47"},
    	{"M4"},
    	{"Tec9"},
    	{"Country Rifle"},
    	{"Sniper Rifle"},
    	{"Rocket Launcher"},
    	{"Heat-Seeking Rocket Launcher"},
    	{"Flamethrower"},
    	{"Minigun"},
    	{"Satchel Charge"},
    	{"Detonator"},
    	{"Spray Can"},
    	{"Fire Extinguisher"},
    	{"Camera"},
    	{"Night Vision Goggles"},
    	{"Infrared Vision Goggles"},
    	{"Parachute"},
    	{"Fake Pistol"}
    };
    
    public AntiHack()
    {
    	new name[24];
    	new weapon;
    	new gunammo;
    	new string[256];
    	for (new i = 0; i <MAX_PLAYERS; i++)
    	{
    	    for (new w = 0; w <MAX_PLAYERS; w++)
    	    {
    	        GetPlayerWeaponData(i, w, weapon, gunammo);
    	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
    	        {
    		        GetPlayerName(i, name, sizeof(name));
    	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames(weapon));
    	            SendClientMessageToAll(COLOR_RED, string);
    	            Ban(i);
    	            BanLog(string);
    			}
    		}
    	}
    	return 1;
    }
    imi da atatea eror
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27563) : error 001: expected token: ";", but found "("
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27612) : error 010: invalid function or declaration
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 012: invalid function call, not a valid address
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : warning 215: expression has no effect
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 001: expected token: ";", but found ")"
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 029: invalid expression, assumed zero
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : fatal error 107: too many error messages on one line
    
    Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    6 Errors.
    

  8. poi pune si u coordonatele unde se mearga bariera cand se inchide

    un MoveObject(x,y,z..) asa

    public BarrierClose()
    {
        SetObjectRot(barrier, 0.0, 0.0, 0.2);
        SetObjectRot(barrier2, 0.0, 0.0, 0.2);
        return 1;
    }

    incearca sa pui in loc de setobjectrot MoveObject si coordonatele cand gate-ul e inchis

  9. Am modificat () in loc de [] unde am stiut dar uite

    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27563) : error 001: expected token: ";", but found "("
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27612) : error 010: invalid function or declaration
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 028: invalid subscript (not an array or too many subscripts): "GunNames"
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : warning 215: expression has no effect
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 001: expected token: ";", but found "]"
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 029: invalid expression, assumed zero
    D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : fatal error 107: too many error messages on one line
    Liniile sunt astea
    new GunNames()][32] = {
    	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames(weapon));

  10. care ar putea sa ma ajute cu o faza ca am bagat un anti-hack si cand scoate unu de exemplu minigun nu imi scrie doar 1 data ca respectivu a luat ban ce ne face un spam ca ne umple ban.cfg [ Si pe linux si pe windows ne face]

    Asta este anti-hack

    public AntiHack()
    {
    	new name[24];
    	new weapon;
    	new gunammo;
    	new string[256];
    	for (new i = 0; i <MAX_PLAYERS; i++)
    	{
    	    for (new w = 0; w <MAX_PLAYERS; w++)
    	    {
    	        GetPlayerWeaponData(i, w, weapon, gunammo);
    	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
    	        {
    		        GetPlayerName(i, name, sizeof(name));
    	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames[weapon]);
    	            SendClientMessageToAll(COLOR_RED, string);
    	            Ban(i);
    	            BanLog(string);
    			}
    		}
    	}
    	return 1;
    }
    
    public JetPackCheck()
    {
    	for(new i = 0; i <MAX_PLAYERS; i++)
    	{
    	    if(IsPlayerConnected(i))
    	    {
    	        if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
    	        {
    	            new string[128];
    	            new name[24];
    	            GetPlayerName(i, name, sizeof(name));
    	            format(string, sizeof(string), "[Anti-Hack] %s a fost anat din cauza hack-ului de jetkpack!", name);
    	            SendClientMessageToAll(COLOR_RED, string);
    	            Ban(i);
    	            BanLog(string);
    			}
    		}
    	}
    	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.