SkiZzoel Posted November 22, 2015 Share Posted November 22, 2015 Salutare.1.Detin un gamemode si am probleme cu urmatoarea comanda.Ar trebui sa arate reporturile care nu sunt acceptate dar acestea nu apar.Ma puteti ajuta?CMD:reports(playerid, params[]){ if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { new iString[712],string[128],count= 0,titlestring[50],name[30]; if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, AdminOnly); foreach(Player, i) { if(GetPVarString(i, "Report", string, 128)) { GetPVarString(i, "Report", string, sizeof(string)); count++; GetPlayerName(i, name,sizeof(name)); format(string, sizeof(string), "Report: %s(%d) - ID(%d)\n",name,i,i); strcat(iString,string); } } format(titlestring, sizeof(titlestring), "Pending Report: %d", count); ShowPlayerDialog(playerid, 311, DIALOG_STYLE_LIST, titlestring, iString, "Close", ""); SendClientMessage(playerid, COLOR_GREEN, "Use the command /checkal to check the pending help information."); if(count == 0) return SCM(playerid,COLOR_GREEN,"No report available."); } return 1;}2.Gamemodul care il detin este asemanator celui ....reclama...,sistemul de masini fiind:poti avea doar o masina spawnata.Stiti cum pot face sa fie toate spawnate in acelasi timp? Link to comment Share on other sites More sharing options...
Adi007 Posted November 22, 2015 Share Posted November 22, 2015 Formezi stringul gresit aici: format(string, sizeof(string), "Report: %s(%d) - ID(%d)\n",name,i,i); Ar trebui sa fie format(string2, sizeof(string2), "Report: %s(%d) - %s\n",name,i,string); ti-am folosit alta variabila, string2, pentru ca "string" era folosit la GetPVarString. Pentru masinile in acelasi timp, nu se invata de pe forum, trebuie sa ai o experienta cu pawno, totusi. Eu o sa incerc sa-ti explic: Ai nevoie de o variabila de genul: new PlayerCar[MAX_PLAYERS][MAX_CARS_PER_PLAYER]; Ai nevoie si de #define MAX_CARS_PER_PLAYER x, unde x e numarul maxim de vehicule pe care un jucator poate sa le aiba spawnate in acelasi timp. Salvezi ID-urile vehiculelor spawnate in variabila aia, de forma PlayerCar[playerid][numar_vehicul_jucator] = CreateVehicle(..,..,..,..,etc). O sa ai nevoie de niste conditii stricte, pentru a fi sigur ca nu se atinge limita de 2000 de vehicule impusa de SA:MP. Multe lucruri nu-ti pot spune, avand in vedere ca nu am in fata actualul sistem de vehicule al gamemode-ului tau, ti-am dat doar un exemplu despre cum ai putea sa faci. Link to comment Share on other sites More sharing options...
SkiZzoel Posted November 22, 2015 Author Share Posted November 22, 2015 multumesc o sa incerc imediat si o sa vad daca merge.iar cu masinile o sa incerc sa vad cum e.Te mai rog oricum.ma poti ajuta cu comanda /createhouse eu am mai incercat sa o fac dar nu reusesc.uite aici poate ajuta- enum hInfo{ hID, Float:hEntrancex, Float:hEntrancey, Float:hEntrancez, Float:hExitx, Float:hExity, Float:hExitz, hOwner[25], hDiscription[64], hValue, hHel, hArm, hInterior, hLock, hOwned, hRent, hRentabil, hTakings, hLevel, hVirtual};new HouseInfo[71][hInfo], Text3D:HouseLabel[sizeof(HouseInfo)], HousePickup[200]; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.