Jump to content
  • 0

problema checkpoints


GEORGIKAA

Question

salut. am modificat recent jobul arms dealer si l am facut asemanator ruby si am problema asta cand modific la onplayerentercheckpoint

aici este problema, daca sterg asta nu mai am erorile.

D:\server\pawno\include\fly.inc(58) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\pawno\include\fly.inc(58) : warning 219: local variable "y" shadows a variable at a preceding level
D:\server\pawno\include\fly.inc(106) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\pawno\include\fly.inc(106) : warning 219: local variable "y" shadows a variable at a preceding level
D:\server\pawno\include\firework.inc(68) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\pawno\include\progress2.inc(381) : error 017: undefined symbol "ppb_OnGameModeInit"
D:\server\pawno\include\progress2.inc(465) : error 017: undefined symbol "ppb_OnGameModeExit"
D:\server\gamemodes\ExtremeGame.pwn(31) : error 017: undefined symbol "AntiDeAMX"
D:\server\gamemodes\ExtremeGame.pwn(2321) : warning 219: local variable "vehicleid" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(3943) : error 017: undefined symbol "SetPlayerPosEx"
D:\server\gamemodes\ExtremeGame.pwn(3958) : warning 219: local variable "health" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(3965) : error 017: undefined symbol "SetPlayerHealthEx"
D:\server\gamemodes\ExtremeGame.pwn(3969) : error 017: undefined symbol "SetPlayerHealthEx"
D:\server\gamemodes\ExtremeGame.pwn(4044) : error 017: undefined symbol "SetPlayerHealthEx"
D:\server\gamemodes\ExtremeGame.pwn(4049) : error 017: undefined symbol "ProxDetector"
D:\server\gamemodes\ExtremeGame.pwn(4696) : warning 219: local variable "health" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(4704) : error 017: undefined symbol "Carspeed"
D:\server\gamemodes\ExtremeGame.pwn(4770) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(4773) : warning 219: local variable "health" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5056) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5069) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5082) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5095) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5108) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5121) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5134) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5147) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5160) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5172) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5182) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5197) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5210) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5223) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5236) : warning 219: local variable "x" shadows a variable at a preceding level
D:\server\gamemodes\ExtremeGame.pwn(5474) : error 017: undefined symbol "NumIp"
D:\server\gamemodes\ExtremeGame.pwn(5493) : error 017: undefined symbol "ABroadCast"
D:\server\gamemodes\ExtremeGame.pwn(5703) : error 017: undefined symbol "SS"
D:\server\gamemodes\ExtremeGame.pwn(5716) : error 017: undefined symbol "ClearWanted"
D:\server\gamemodes\ExtremeGame.pwn(5744) : error 017: undefined symbol "BanCheck"
D:\server\gamemodes\ExtremeGame.pwn(5894) : error 017: undefined symbol "CrimInRange"
D:\server\gamemodes\ExtremeGame.pwn(5928) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5929) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5930) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5931) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5938) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5939) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5940) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5941) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5981) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5982) : error 017: undefined symbol "SendTeamMessage"
D:\server\gamemodes\ExtremeGame.pwn(5983) : error 017: undefined symbol "SendTeamMessage"

 

aici este problema, daca sterg asta nu mai am erorile.


   

	else if(CP[playerid] == 6901)
	{
		if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}Get out of the vehicle and press 'H' to take the package and deliver it.");
		if(GetPVarInt(playerid, "InHand") == 0) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}You don't have the package in arms.");
		{
			new strings[64];
			new materiale = 1000 + random(5000);
			format(strings, sizeof strings, "{008080}JOB >> {ffffff}You received %s materials.", FormatNumber(materiale));
			SendClientMessage(playerid, -1, strings);
			DisablePlayerCheckpoint(playerid);
			facemateriale[playerid] = 0;
			CP[playerid] = 0;
			SetPVarInt(playerid, "InHand", 0);
			SetPlayerSpecialAction(playerid, 0);
			RemovePlayerAttachedObject(playerid, 6);
			ClearAnimations(playerid);
			PlayerInfo[playerid][pMats] += materiale;
			PlayerInfo[playerid][pArmsTimes] ++;
			Update(playerid,pMatsx);
			Update(playerid,pArmsTimesx);
		}
	}

care i buba aici?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Problema ta e faptul ca ai un set de acolade care nu au nici un fel sens care cel mai probabil iti blocau o alta eroare

else if(CP[playerid] == 6901)
	{
		if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}Get out of the vehicle and press 'H' to take the package and deliver it.");
		if(GetPVarInt(playerid, "InHand") == 0) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}You don't have the package in arms.");
		
		new strings[64];
		new materiale = 1000 + random(5000);
		format(strings, sizeof strings, "{008080}JOB >> {ffffff}You received %s materials.", FormatNumber(materiale));
		SendClientMessage(playerid, -1, strings);
		DisablePlayerCheckpoint(playerid);
		facemateriale[playerid] = 0;
		CP[playerid] = 0;
		SetPVarInt(playerid, "InHand", 0);
		SetPlayerSpecialAction(playerid, 0);
		RemovePlayerAttachedObject(playerid, 6);
		ClearAnimations(playerid);
		PlayerInfo[playerid][pMats] += materiale;
		PlayerInfo[playerid][pArmsTimes] ++;
		Update(playerid,pMatsx);
		Update(playerid,pArmsTimesx);
		
	}

Avand in vedere ca if de aici are deja un return, acoladele sunt doar de decor pentru ca orice se afla intre ele era executat oricum deoarece if-ul s-a finalizat odata cu return

if(GetPVarInt(playerid, "InHand") == 0)

Si din cauza acestor acolade(poate si mai multe in codul tau) puse degeaba mascau erori/lipsuri in codul tau sau cine stie ce altceva

Practic codul tau postat pentru compilator arata ceva de genul

if(GetPVarInt(playerid, "InHand") == 0) // Daca e true executa urmatoarea instructiune
	return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}You don't have the package in arms."); // Instructiunea se termina aici
    
{
  // Nu conteaza ce valoarea are if deoarece if-ul nu se mai aplica fiind deja executat (fie true sau false)
  // Se executa mereu
}

 

  • Like 1
Link to comment
Share on other sites

  • 0
Acum 5 minute, Banditul a spus:

Problema ta e faptul ca ai un set de acolade care nu au nici un fel sens care cel mai probabil iti blocau o alta eroare

else if(CP[playerid] == 6901)
	{
		if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}Get out of the vehicle and press 'H' to take the package and deliver it.");
		if(GetPVarInt(playerid, "InHand") == 0) return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}You don't have the package in arms.");
		
		new strings[64];
		new materiale = 1000 + random(5000);
		format(strings, sizeof strings, "{008080}JOB >> {ffffff}You received %s materials.", FormatNumber(materiale));
		SendClientMessage(playerid, -1, strings);
		DisablePlayerCheckpoint(playerid);
		facemateriale[playerid] = 0;
		CP[playerid] = 0;
		SetPVarInt(playerid, "InHand", 0);
		SetPlayerSpecialAction(playerid, 0);
		RemovePlayerAttachedObject(playerid, 6);
		ClearAnimations(playerid);
		PlayerInfo[playerid][pMats] += materiale;
		PlayerInfo[playerid][pArmsTimes] ++;
		Update(playerid,pMatsx);
		Update(playerid,pArmsTimesx);
		
	}

Avand in vedere ca if de aici are deja un return, acoladele sunt doar de decor pentru ca orice se afla intre ele era executat oricum deoarece if-ul s-a finalizat odata cu return

if(GetPVarInt(playerid, "InHand") == 0)

Si din cauza acestor acolade(poate si mai multe in codul tau) puse degeaba mascau erori/lipsuri in codul tau sau cine stie ce altceva

Practic codul tau postat pentru compilator arata ceva de genul

if(GetPVarInt(playerid, "InHand") == 0) // Daca e true executa urmatoarea instructiune
	return SendClientMessage(playerid, -1, "{008080}JOB >> {ffffff}You don't have the package in arms."); // Instructiunea se termina aici
    
{
  // Nu conteaza ce valoarea are if deoarece if-ul nu se mai aplica fiind deja executat (fie true sau false)
  // Se executa mereu
}

 

multumesc frumos

am gasit, eram o acolada lipsa putin mai sus in gamemode

Link to comment
Share on other sites

  • 0

Uhm, in principal este din prima incercare callback-ul fiind chemat chiar in momentul in care player intra in checkpoint(folosind un gm de trucking care era bazat pe checkpoint-uri nu am avut probleme cu asta doar cand server-ul/player-ul aveau lag (ping etc)), imi vin in minte 2 idei dar nu sunt sigur

1. Exista o posibilitatea ca ceva cod aflat in OnPlayerEnterCheckpoint care este executat indifierent de situatie sa ingreuneze executia codului pentru finzaliarea cursei (putin probabil daca ma gandesc)

2. Sa existe alt cod undeva in gamemode care dureaza mult sa se execute (care ingreuneaza in mare parte executarea in parametri a altor functii) si oarecum sa intarzie executarea OnPlayerEnterCheckpoint

Sunt doar niste teori totusi pentru ca functia in sine nu are delay implicit deci altceva ii blocheaza executia

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By CristianLMAO
      Salut!
      Codul:
      #include <a_samp> #include <dini> #include <dudb> #include <zcmd> #pragma unused ret_memcpy //colors #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define SERVER_USER_FILE "database/users/%s.ini" // users #define SERVER_ALOG_FILE "database/log/adminlogs.txt" // alogs #define gmtext "gold.united-islands.ro | v0.2" #define function%0(%1) forward %0(%1); public %0(%1) main() { } public OnGameModeInit() { SetGameModeText(gmtext); AddPlayerClass(0,1219,-1813.5,16.5,179.5,0,0,0,0,0,0); //spawn bikes CreateVehicle(510, 1237,-1813.2892,13.4315,270, 0, 0, 60); CreateVehicle(510, 1237,-1815.0358,13.4282,270, 0, 0, 60); CreateVehicle(510, 1237,-1816.5765,13.4258,270, 0, 0, 60); CreateVehicle(510, 1237,-1817.9580,13.4233,270, 0, 0, 60); CreateVehicle(510, 1237,-1819.4449,13.4225,270, 0, 0, 60); CreateVehicle(510, 1237,-1820.9550,13.4193,270, 0, 0, 60); CreateVehicle(510, 1237,-1822.3446,13.4148,270, 0, 0, 60); CreateVehicle(510, 1237,-1823.8909,13.4133,270, 0, 0, 60); // pickups CreatePickup(1581, 1, 1214.0170,-1814.4308,16.8, -1); //3d texts Create3DTextLabel("DMV\nScrie '/startexam' pentru a intra in examen! Acest examen costa 500k bani!", 0x00FF00BB, 1214.0170,-1814.4308,16.5, 40, 0, 1); return 1; } public OnGameModeExit(){ } enum pInfo { pCash, pBank, pAdminLevel, pBonusPoints, pScore, pPremium, pMuted, pInDmv, pDmvStage, pCarLic, pBanned } new PlayerInfo[MAX_PLAYERS][pInfo]; new gPlayerLogged[MAX_PLAYERS]; public OnPlayerConnect(playerid) { gPlayerLogged[playerid] = 0; new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if (!dini_Exists(file)) { ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Register", "Scrie mai jos parola pe care vrei sa o ai la cont:", "Register", "inchide"); } if(fexist(file)) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Login", "Punte-ti parola mai jos:", "Login", "Leave"); } return 1; } public OnPlayerDisconnect(playerid, reason) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(gPlayerLogged[playerid] == 1) { dini_IntSet(file, "Cash", PlayerInfo[playerid][pCash]); dini_IntSet(file, "Bank", PlayerInfo[playerid][pBank]); dini_IntSet(file, "Score", PlayerInfo[playerid][pScore]); dini_IntSet(file, "BonusPoints", PlayerInfo[playerid][pBonusPoints]); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel]); dini_IntSet(file, "Premium",PlayerInfo[playerid][pPremium]); dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted]); dini_IntSet(file, "InDMV",PlayerInfo[playerid][pInDmv]); dini_IntSet(file, "DmvStage",PlayerInfo[playerid][pDmvStage]); dini_IntSet(file, "Carlic",PlayerInfo[playerid][pCarLic]); dini_IntSet(file, "Banned",PlayerInfo[playerid][pBanned]); } gPlayerLogged[playerid] = 0; return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == 1) { new name[MAX_PLAYER_NAME], file[256], string[128]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Register", "Scrie mai jos parola pe care vrei sa o ai la cont:", "Register", "inchide"); dini_Create(file); dini_IntSet(file, "Cash", PlayerInfo[playerid][pCash] = 1000000); dini_IntSet(file, "Bank", PlayerInfo[playerid][pBank] = 5000); dini_IntSet(file, "Password", udb_hash(inputtext)); dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][pAdminLevel] = 0); dini_IntSet(file, "BonusPoints",PlayerInfo[playerid][pBonusPoints] = 0); dini_IntSet(file, "Score",PlayerInfo[playerid][pScore] = 1); dini_IntSet(file, "Premium",PlayerInfo[playerid][pPremium] = 0); dini_IntSet(file, "Muted",PlayerInfo[playerid][pMuted]); dini_IntSet(file, "InDMV",PlayerInfo[playerid][pInDmv] = 1); dini_IntSet(file, "DmvStage",PlayerInfo[playerid][pDmvStage] = 0); dini_IntSet(file, "Carlic",PlayerInfo[playerid][pCarLic]); dini_IntSet(file, "Banned",PlayerInfo[playerid][pBanned]); format(string, 128, "[SYSTEM]: succes registrat numele asta %s, ai intrat autologin.", name); SendClientMessage(playerid, COLOR_YELLOW, string); SpawnPlayer(playerid); gPlayerLogged[playerid] = 1; } if (dialogid == 2) { new name[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(!response) return Kick(playerid); if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Login", "Punte-ti parola mai jos:", "Login", "Leave"); new tmp; tmp = dini_Int(file, "Password"); if(udb_hash(inputtext) != tmp) { SendClientMessage(playerid, COLOR_RED, "[SYSTEM] Parola gresita!"); ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "Login", "Punte-ti parola mai jos:", "Login", "Leave"); } else { SpawnPlayer(playerid); gPlayerLogged[playerid] = 1; PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel"); SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); GivePlayerMoney(playerid, dini_Int(file, "Cash")-GetPlayerMoney(playerid)); SendClientMessage(playerid,COLOR_GREEN, "[SYSTEM]: Te-ai logat!"); } } return 1; } public OnPlayerStateChange(playerid, newstate, oldstate){ return 1; } public OnPlayerText(playerid, text[]){ new name[MAX_PLAYER_NAME]; new file[256]; new string[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(dini_Int(file, "Muted") == 1){ format(string, sizeof(string), "You can't talk right now! You are muted."); SendClientMessage(playerid, COLOR_GREY, string); return 0; } else{ return 1; } } public OnPlayerSpawn(playerid) { new name[MAX_PLAYER_NAME]; new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(dini_Int(file, "InDmv") == 1) { SendClientMessage(playerid, COLOR_GREEN, "Ai picat testul deoarece ai iesit de pe server!"); dini_IntSet(file, "InDmv", PlayerInfo[playerid][pInDmv] = 0); } return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new name[MAX_PLAYER_NAME]; new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(ispassenger == 0){ if(dini_Int(file, "Carlic") == 0) { SendClientMessage(playerid, COLOR_GREY, "* Nu ai permis de conducere! Scrie /dmv pentru a incepe un curs de conducere"); SlapPlayer(playerid); } } return 1; } public OnPlayerExitVehicle(playerid, vehicleid){ new name[MAX_PLAYER_NAME]; new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(dini_Int(file, "InDmv") == 1){ DestroyVehicle(vehicleid); dini_IntSet(file, "InDmv", PlayerInfo[playerid][pInDmv] = 0); SendClientMessage(playerid, COLOR_RED, "Deoarece ai iesit din masina testului, ai picat examenul"); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]){ return 0; } stock GetName(playerid){ new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, MAX_PLAYER_NAME); return playername; } public OnPlayerEnterCheckpoint(playerid){ new name[MAX_PLAYER_NAME]; new file[256]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(dini_Int(file, "DmvStage") == 1){ SetPlayerCheckpoint(playerid, 1311.3917,-1840.5356,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 2); } if(dini_Int(file, "DmvStage") == 2){ SetPlayerCheckpoint(playerid, 1326.6887,-1734.6566,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 3); } if(dini_Int(file, "DmvStage") == 3){ SetPlayerCheckpoint(playerid, 1526.7543,-1735.5416,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 4); } if(dini_Int(file, "DmvStage") == 4){ SetPlayerCheckpoint(playerid, 1526.1432,-1590.6320,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 5); } if(dini_Int(file, "DmvStage") == 5){ SetPlayerCheckpoint(playerid, 1406.6301,-1590.2607,12.9650, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 6); } if(dini_Int(file, "DmvStage") == 6){ SetPlayerCheckpoint(playerid, 1314.1741,-1563.0592,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 7); } if(dini_Int(file, "DmvStage") == 7){ SetPlayerCheckpoint(playerid, 1359.6761,-1422.0052,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 8); } if(dini_Int(file, "DmvStage") == 8){ SetPlayerCheckpoint(playerid, 1278.8462,-1394.5029,12.7273, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 9); } if(dini_Int(file, "DmvStage") == 9){ SetPlayerCheckpoint(playerid, 1208.9016,-1385.4451,12.8471, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 10); } if(dini_Int(file, "DmvStage") == 10){ SetPlayerCheckpoint(playerid, 1216.1479,-1284.8210,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 11); } if(dini_Int(file, "DmvStage") == 11){ SetPlayerCheckpoint(playerid, 1310.4785,-1281.9036,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 12); } if(dini_Int(file, "DmvStage") == 12){ SetPlayerCheckpoint(playerid, 1313.7811,-1540.7218,12.9961, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 13); } if(dini_Int(file, "DmvStage") == 13){ SetPlayerCheckpoint(playerid, 1309.2744,-1822.3461,12.9904, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 14); } if(dini_Int(file, "DmvStage") == 14){ SetPlayerCheckpoint(playerid, 1272.6282,-1847.5135,12.9977, 10); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 15); } if(dini_Int(file, "DmvStage") == 15){ SetPlayerCheckpoint(playerid, 1271.3938,-1827.1415,12.9922, 10); dini_IntSet(file, "DmvStage", 16); } if(dini_Int(file, "DmvStage") == 16){ DisablePlayerCheckpoint(playerid); dini_IntSet(file, "DmvStage", 0); dini_IntSet(file, "InDMV", 0); dini_IntSet(file, "Carlic", 1); DestroyVehicle(GetPlayerVehicleID(playerid)); } return 0; } //comenzi: CMD:startexam(playerid, params){ new name[MAX_PLAYER_NAME]; new file[256]; new car[1]; GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), SERVER_USER_FILE, name); if(dini_Int(file, "Carlic") == 1) return SendClientMessage(playerid, COLOR_RED, "Deja ai licenta pentru masina!"); if(dini_Int(file, "InDMV") == 1) return SendClientMessage(playerid, COLOR_RED, "Deja esti in examen, daca crezi ca este o problema, poti sa reintri pe server!"); if(dini_Int(file, "Cash") < 500000) return SendClientMessage(playerid, COLOR_RED, "Nu ai suficienti bani pentru a face acest lucru!"); DisablePlayerCheckpoint(playerid); dini_IntSet(file, "Cash", PlayerInfo[playerid][pCash] =dini_Int(file, "Cash")-500000); dini_IntSet(file, "InDMV", PlayerInfo[playerid][pInDmv] = 1); GivePlayerMoney(playerid, dini_Int(file, "Cash")-GetPlayerMoney(playerid)); dini_IntSet(file, "CarLic", PlayerInfo[playerid][pCarLic] = 0); car[0] = CreateVehicle(421, 1267.9502,-1825.6804,13.3818,185.7668, 1, 1, 90000000); PutPlayerInVehicle(playerid, car[0], 0); SetPlayerCheckpoint(playerid, 1269.2395,-1846.8804,13.0048, 10); SendClientMessage(playerid, COLOR_GREEN, "Du-te la checkpoint-uri!"); dini_IntSet(file, "DmvStage", PlayerInfo[playerid][pDmvStage] = 1); return 1; } Cand compilez, nu se intampla nimic, dar in joc, cand intru in checkpoint imi activeaza toate checkpointurile
      Stiu ce am facut gresit, dar nu stiu sa rezolv. 
      Check-pointurile sunt la OnPlayerEnterCheckpoint.
       
      Multumesc!
    • By St3f4n36
      Cum as putea fac urmatoarea chestie:
      Daca intr-un dialog imi apare ca primeste x bani daca apasa cazul 1 ( banii formati cu new money = 100 + rand(100); )
      si dupa sa imi trimita un mesaj tot cu aceasi suma de bani x. Trebuie salvata intr-o variabila sau cum?
    • By FlobertRO
      Buna , am si eu o problema . Mi-se restarteaza serverulul random . In server_log am gasit asta : 
      Stie cineva ce pot face  Va rog ❤️ . Multumesc frumos
       
       
      [23:17:26] [join] rezana has joined the server (1:---------------------) [23:17:26] [debug] Run time error 4: "Array index out of bounds" [23:17:26] [debug] Accessing element at index 1 past array upper bound 0 [23:17:26] [debug] AMX backtrace: [23:17:26] [debug] #0 00200b24 in ?? (... <1 argument>) at GM.pwn:8108 [23:17:26] [debug] #1 000aef80 in public MP_OPC (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_hooks/impl.inc:633 [23:17:26] [debug] #2 native CallLocalFunction () from samp03svr [23:17:26] [debug] #3 0000c77c in public SSCANF_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\mSelection.inc:432 [23:17:26] [debug] #4 00003210 in public Itter_OnPlayerConnect (playerid=1) at C:\Users\xda\Desktop\gamemode-impact\gamemode-rpg-impact\pawno\include\sscanf2.inc:236 [23:17:26] [debug] #5 00001684 in public OnPlayerConnect (playerid=1) at C:\Users\Florin\Dxda\gamemode-impact\gamemode-rpg-impact\pawno\include\YSI\y_iterate.inc:646
    • By Rby Robert
      cand dau /ad pe server scriu acolo /ad Recrutez in clanul .... nu apare ad pe server apare la staff Preview ad dar pe server la playerii nu apare
      Aceasta este comanda
      YCMD:ad(playerid, params[], help) {
          if(AdTimer[playerid] != 0) return SCM(playerid, COLOR_LGREEN, "Ai pus un anunt recent. Foloseste comanda /myad pentru a-l vedea.");
          new string[264],idx;
          if(!PlayerInfo[playerid][pPhone]) return SCM(playerid, COLOR_LGREEN, "Nu ai un telefon.");
          if(PlayerInfo[playerid][pMuted] == 1) {
              format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
              SCM(playerid, COLOR_GREY, string);
              return true;
          }
          if(PlayerInfo[playerid][pLevel] < 5) return SCM(playerid, COLOR_GREY, "Ai nevoie de nivel 5 pentru a da un anunt!");
          new length = strlen(params);
          while ((idx < length) && (params[idx] <= ' ')) idx++;
          new offset = idx, result[264];
          while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
              result[idx - offset] = params[idx];
              idx++;
          }
          result[idx - offset] = EOS;
          new totalads = TotalAds()+1;
          if(PlayerToPoint(10, playerid, BizzInfo[11][bEntranceX], BizzInfo[11][bEntranceY], BizzInfo[11][bEntranceZ])) {
              if(!strlen(result)) return SCM(playerid, COLOR_GREY, "Usage:{FFFFFF}/ad <Text>");
              if(FaceReclama(result)) return Reclama(playerid, result);
              new payout = BizzInfo[14][bFee];
              if(PlayerMoney(playerid, payout)) {
                  format(string, sizeof(string), "* Ai folosit %d caractere si anuntul costa $%s, Nu ai banii necesari", offset, FormatNumbers(payout));
                  SCM(playerid, COLOR_WHITE, string);
                  return true;
              }
              GivePlayerCash(playerid, 0, payout);
              format(string, sizeof(string), "~r~Ai platit $%d~n~~w~Mesajul contine: %d caractere", payout, idx);
              GameTextForPlayer(playerid, string, 5000, 5);
              format(AdText[playerid], 256, result);
              format(string, sizeof(string), "[PREV AD] %s ({FFFFFF}%d{00D900}): %s", GetName(playerid), playerid, result);
              SendStaffMessage(0xDE1414FF, string);
              AdTimer[playerid] = totalads*60;
              new timer;        
              timer = SetTimerEx("Advertisment", totalads*60000, 0, "d", playerid);
              SetPVarInt(playerid, "AdTimer", timer); 
              format(string, sizeof(string), "Anuntul tau va fi afisat in %d minute (%d secunde).", AdTimer[playerid]/60, AdTimer[playerid]);
              SCM(playerid, -1, string);
              BizzInfo[14][bBalance] += payout;
              new str[128];
              mysql_format(SQL,str,128,"UPDATE bizz SET `Till`='%d',`Products`='%d' WHERE `ID`='1'",BizzInfo[14][bBalance],BizzInfo[14][bProducts]);
              mysql_tquery(SQL,str, "", "");
          }
          else SCM(playerid, -1, "Nu esti la CNN.");
          return true;
      }
      function Advertisment(playerid) {
          if(IsPlayerConnected(playerid) && AdTimer[playerid] != 0) {
              new string[1024];
              format(string, sizeof(string), "Ad by %s (phone: {FFFFFF}%d{00D900}): %s",GetName(playerid),PlayerInfo[playerid][pPhone],AdText[playerid]);
              SendMessage(0x00D900FF, string);
              AdTimer[playerid] = 0;
          }
          return true;
      }
      function TotalAds() {
          new x;
          foreach(Player, i) {
              if(IsPlayerConnected(i) && AdTimer[i] != 0) x++;
          }
          return x;
      }
    • By Raul112233
      SQLSTATE[HY000] [1045] Access denied for user 'client214_samp'@'188.212.100.160' (using password: NO)
      rezolvare la eroarea asta???
  • Recently Browsing   0 members

    No registered users viewing this page.

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