Jump to content

Spongibubu

Membru
  • Posts

    37
  • Joined

  • Last visited

Posts posted by Spongibubu

  1. Tu daca ai fi in viata reala sau pe un server rp, ti-ar place sa te gasesti la gara cu un cap de dragon si vegetatie mult prea multa? Si luminile de pe bulevard, sunt prea multe si nu au sens. La fel si parcul de la spital. Si mai ales pe plaja. Ce-i aia? Parcare? Unde ai mai vazut tu asa ceva (pe un server a fost)? Realismul unde este?

  2. On 7/9/2018 at 12:16 AM, Umbra said:

    pe bigzone zic eu ca poti invata.

    Aici gresesti. Gamemode-urile de tip BuGGeD sau Bladex din 2016 nu sunt optimizate, codul nu este aranjat frumos in gamemode, iar notiunile sunt invechite. Eu anul trecut cand am inceput prima data am incercat bigzone, bugged, bladex (bladex e ok pentru cei experimentati), nu stiam pe unde sa le gasesc si cum sa le schimb si mai important cum as putea sa creez noi sisteme. Deci zic si eu tot Burned. Succes @SirFulgeruL!

  3. Salut, @kenveloo! Din ce inteleg eu vrei ca adminii sa-si poata cumpara lucruri din shop gratis. Daca am inteles corect uite cum faci:

     

    La CMD:shop faci asta:

    CMD:shop(playerid, params[]) {
      	// ce verificari mai ai tu gen daca e logat
      	if(PlayerInfo[playerid][pAdmin] >= x) return ShowPlayerDialog(playerid, DIALOG_ASHOP, DIALOG_STYLE_TABLIST_HEADERS, "Admin Shop", ...);
      	else return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_TABLIST_HEADERS, ...);
     	return 1; 
    }

    Am pus x nivelul de admin minim pentru admin shop, deoarece nu stiu ce vrei tu. Va trebui sa definesti DIALOG_ASHOP, iar ... inseamna ce mai ai tu acolo in shop cu butoanele. 

     

    Sper ca te-am ajutat. Iti urez o zi frumoasa si succes in continuare!

  4. Salut, @AdyHD! Este foarte simplu ce vrei sa faci. Unde ai tu in gamemode sa inceapa inregistrarea sau logarea (atentie, nu la dialoguri!) adaugi linia

    PlayAudioStreamForPlayer(playerid, "aici vei pune link-ul", 0.0, 0.0, 0.0, 0.0, 0);
    // SAU PENTRU CA ESTE DOAR PENTRU LOGIN/INREGISTRARE SI SA SCRII MAI PUTIN DEOARECE NU VOM FOLOSI COORDONATE SI RAZA:
    PlayAudioStreamForPlayer(playerid, "aici vei pune link-ul");

    Iar apoi cand se logheaza/inregistreaza (cand primeste spawn) adaugi undeva:

    StopAudioStreamForPlayer(playerid);

    Sper ca te-am ajutat. Sa ai o zi frumoasa! Succes!

  5. Salut! Te voi ajuta eu.

     

    In primul rand, la public OnPlayerText(playerid, text[]) inloc de return 1; pui return 0; deoarece de acum noi vom formata textul.

     

    Unde ai stock-urile adaugi aceste stock-uri

    stock SendNearbyMessage(playerid, text[], color, Float:range) {
      	new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
      	foreach(Player, i) {
         	if(IsPlayerInRangeOfPoint(i, range, X, Y, Z)) {
              	SendClientMessage(i, color, text);
            }
        }
     	return 1; 
    }
    
    stock GetName(playerid) {
      	new PName[25];
      	GetPlayerName(playerid, PName, sizeof(PName);
     	return PName; 
    }

    Inloiesti public OnPlayerText(playerid, text[]) cu asta:

    public OnPlayerText(playerid, text[]) {
    	new str[128];
      	format(str, sizeof(str), "%s says: %s", GetName(playerid), text);
      	SendNearbyMessage(playerid, str, -1, 30.0);
    	return 0;
    }

    Dupa cum vezi, este ceva chiar simplu. Poti schimba 30.0 cu ce distanta vrei tu, -1 cu ce culoare (aici e alb).

     

    Sper ca te-am ajutat, iar daca mai ai nevoie de ceva te rog sa-mi dai un PM sau reply la topic. Succes!

  6. 17 hours ago, valivaly96 said:
    
    CMD:v(playerid, params[]) { 
    	ShowPlayerVehicle(playerid);
    	return 1;
    }
    
    stock ShowPlayerVehicle(playerid) {
    	new szTitle[180], szDialog[1300], szDialog2[1300], vstatus[1024];
    	if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own any vehicles.");	
    	format(szTitle, sizeof(szTitle), "Vehicles (%d/4)", GetVehicles(playerid));			
    	for(new i = 0; i < 5; i++) {
    		if(PlayerInfo[playerid][pCarKey][i] > 0) {
    			new car =  PlayerInfo[playerid][pCarKey][i];
    			if(IsVehicleOccupied(CarInfo[car][cSpawned])) format(vstatus, sizeof(vstatus), "{FFFF00}(Occupied){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			else if(CarInfo[car][cSpawned] > 0) format(vstatus, sizeof(vstatus), "{26B309}(Spawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			else format(vstatus, sizeof(vstatus), "{FF0000}(Despawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			format(szDialog, sizeof(szDialog), "%s\n", vstatus);
    			strcat(szDialog2, szDialog);
    		}
    		ShowPlayerDialog(playerid, DIALOG_GARAGE, DIALOG_STYLE_LIST, szTitle, szDialog2, "Ok", "Exit");
    	}
    	return 1;
    }

    Daca nu merge ce erori ai in consola cu codul modificat?

    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at index 2 in array of size 2
    [debug] AMX backtrace:
    [debug] #0 00062188 in public OnLogin (0) from gm.amx
    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at negative index -400
    [debug] AMX backtrace:
    [debug] #0 0006ab60 in ?? (0) from gm.amx
    [debug] #1 0004d5e8 in public cmd_v (0, 18800116) from gm.amx
    [debug] #2 native CallLocalFunction () from samp-server.exe
    [debug] #3 00000564 in public OnPlayerCommandText (0, 18800104) from gm.amx

  7. [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at index 2 in array of size 2
    [debug] AMX backtrace:
    [debug] #0 00061304 in public OnLogin (0) from gm.amx
    [debug] Run time error 4: "Array index out of bounds"
    [debug]  Attempted to read/write array element at negative index -400
    [debug] AMX backtrace:
    [debug] #0 00069ecc in ?? (0) from gm.amx
    [debug] #1 0004c524 in public cmd_v (0, 18849172) from gm.amx
    [debug] #2 native CallLocalFunction () from samp-server.exe
    [debug] #3 00000564 in public OnPlayerCommandText (0, 18849160) from gm.amx

    Am vazut ce spune si e ciudat, deoarece ar trebui sa mearga. Voi schimba pCarKey[4] cu pCarKey1 etc.

  8. Salutare! Intâmpin o problema la comanda /v. Când scriu /v îmi spune SERVER: Unknown command.

    Ce aș putea face?

    Aveți aici codul:

    CMD:v(playerid, params[]) { 
    	ShowPlayerVehicle(playerid);
    	return 1;
    }
    
    stock ShowPlayerVehicle(playerid) {
    	new szTitle[180], szDialog[1300], szDialog2[1300], vstatus[1024];
    	if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't own any vehicles.");	
    	format(szTitle, sizeof(szTitle), "Vehicles (%d/4)", GetVehicles(playerid));			
    	for(new i = 0; i < 5; i++) {
    		if(PlayerInfo[playerid][pCarKey][i] != 0) {
    			new car =  PlayerInfo[playerid][pCarKey][i];
    			if(IsVehicleOccupied(CarInfo[car][cSpawned])) format(vstatus, sizeof(vstatus), "{FFFF00}(Occupied){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			else if(CarInfo[car][cSpawned] > 0) format(vstatus, sizeof(vstatus), "{26B309}(Spawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			else format(vstatus, sizeof(vstatus), "{FF0000}(Despawned){FFFFFF} %s", aVehicleNames[CarInfo[car][cModel]-400]);
    			format(szDialog, sizeof(szDialog), "%s\n", vstatus);
    			strcat(szDialog2, szDialog);
    		}
    		ShowPlayerDialog(playerid, DIALOG_GARAGE, DIALOG_STYLE_LIST, szTitle, szDialog2, "Ok", "Exit");
    	}
    	return 1;
    }

    O zi frumoasă vă doresc! ?

  9. On 07.08.2017 at 9:10 PM, valion12 said:

    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(3908) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(4101) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(4102) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(4110) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(4198) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(5123) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(5389) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(5390) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(5819) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(6503) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(17863) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(18325) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(21124) : warning 204: symbol is assigned a value that is never used: "strname1"
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(22824) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37643) : warning 219: local variable "obj" shadows a variable at a preceding level
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37848) : warning 213: tag mismatch
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37850) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37851) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37862) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37864) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37867) : warning 217: loose indentation
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37858) : warning 204: symbol is assigned a value that is never used: "query"
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37858) : warning 204: symbol is assigned a value that is never used: "string2"
    C:\Users\rmatc\Desktop\Gamemode BigZone edited by Kenssy\gamemodes\gamemode.pwn(37848) : warning 204: symbol is assigned a value that is never used: "fined"
    Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

     

     

     

    cum faceti toti scripteri deobicei dati gamemoduri pline de errori 

    Acelea nu sunt erori, sunt atwntionari. Majoritatea sunt de la faptul ca liniile respective nu sunt aliniate cum trebuie, iar restul sunt de fapt si de drept variabile care nu au mai fost folosite. Incearca te rog eu mult sa faci diferenta.

  10. On 12.04.2018 at 2:56 PM, MiritaXD said:

    a enum pinfo sau cum ai tu adaugi

    
    pName[40]

    adaugi asta la Onplayerconnect

    
    format(PlayerInfo[playerid][pName], 40, "%s", GetName(playerid));
    
    Asta undeva in GM
    stock GetPName(playerid)
    {
        new szName[MAX_PLAYER_NAME];
        format(szName, sizeof(szName), "%s", PlayerInfo[playerid][pName]);
        return szName;
    }

    Multumesc!

  11. 22 hours ago, cristiviteza said:

    La enum pui OName[24], OnPlayerConnect - > GetPlayerName(playerid, PlayerInfo[playerid][OName], 24);

    OnPlayerText -> if(strcmp(InsertName(playerid), PlayerInfo[playerid][OName], true)) Kick(playerid); //InsertName sau cum ai tu

    Si-ai scapat de niste date mysql

    Multumesc, dar pt ce InsertName si kick la onplayertext?

  12. 15 hours ago, valivaly96 said:

    Deci la canda exit sau cand apasa tasta F/ENTER verifici daca if(IsPlayerInRangeOfPoint(playerid,range,exitx,exity,exitz) && ImHouse[playerid]==i) {setplayerpos;

    setplayervw;

    etc} Toate astea in for-ul aferent de la i=0:housess

    Edit:lasa codul de la exit sai cand apasa f/enter si il scote din casa

    	if(PRESSED(KEY_SECONDARY_ATTACK)) {
    		if(IsPlayerConnected(playerid)) {
    		   for(new i = 1; i < sizeof(HouseInfo); i++) {
    		   		if(InHouse[playerid] == -1) {
    			   	if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez])) {		
    				   	if(HouseInfo[i][hLocked] == 0) {
    					   	SetPlayerInterior(playerid, HouseInfo[i][hInterior]);
    					   	SetPlayerPos(playerid, HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]);
    					   	SetPlayerVirtualWorld(playerid, HouseInfo[i][hVW]);
    					   	InHouse[playerid] = i;
    					}
    				   	else GameTextForPlayer(playerid, "~r~~h~Locked", 1000, 1);
    			   	}
    			
    			}
    			else {	
    				if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz])) {
    					if(HouseInfo[i][hLocked] == 0) {
    						SetPlayerInterior(playerid, 0);
    						SetPlayerPos(playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]);
    						SetPlayerVirtualWorld(playerid, 0);
    						InHouse[playerid] = -1;
    						}
    					}
    			   	}
    			}
    		}
    	}

    Asa am.

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