iNTeL. Posted May 30, 2015 Report Share Posted May 30, 2015 (edited) Buna dimineata. De curand mai bine zis de ieri m-am gandit sa incep si eu sa pricep limbajul PAWNO. Am luat gamemod-ul lui Woops si am incercat sa-i bag o comanda , totul a decurs bine pana la compilare :)). M-am lovit de problema :Linia : //-----------------------------------------Comanda-----------------------------------------// if(strcmp(cmd, "/gotols", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerData[playerid][pAdmin] >= 1 || PlayerData[playerid][pAgent] >= 1) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3); } else { SetPlayerPos(playerid, 1529.6,-1691.2,13.3); } SendClientMessage(playerid, COLOR_WHITE, "Ai fost teleportat cu succes!"); SetPlayerInterior(playerid,0); PlayerData[playerid][pInt] = 0; SetPlayerVirtualWorld(playerid, 0); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, 256, "{C8D4D4}Adm{DB8E12}Warning:{FFFFFF} Admin/Agent %s s-a teleportat. {04DCFD}(/gotols)", sendername); ABroadCast(COLOR_LIGHTRED,string,5); } else { SendError(playerid,cmd); } } return 1; }Linia 113 : new PlayerData[MAX_PLAYERS][playerid];C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(113) : error 017: undefined symbol "playerid" C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(113) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(1368) : error 017: undefined symbol "sendername" C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(1368) : error 017: undefined symbol "sendername" C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(1368) : error 029: invalid expression, assumed zero C:\Users\Claudiu\Downloads\W3oP\gamemodes\w3op.pwn(1368) : fatal error 107: too many error messages on one line Edited May 30, 2015 by iNTeL. Quote Link to comment Share on other sites More sharing options...
Punct. Posted May 30, 2015 Report Share Posted May 30, 2015 (edited) Pentru linia 113, inainte de new PlayerData[MAX_PLAYERS][playerid]; ai un enum .. { }. Vezi ce scrie imediat dupa cuvantul enum si il pui in loc de playerid de la linia 113. Exemplu:enum _PINFO { pID, pPassword[65] } new PlayerData[MAX_PLAYERS][_PINFO]; Pentru linia 1368, trebuie definit sendername. Pune ce ti-am scris eu mai jos, dupa new-urile de la public OnPlayerCommandText(playerid, cmdtext[]), ca sa nu-l tot definesti la fiecare comanda. new sendername[MAX_PLAYER_NAME]]; Edited May 30, 2015 by Punct. Quote Nu mai deschideti in pu*a mea servere de SA:MP ! Jucati-va pe cele care sunt ! Sunt suficiente ! Reguli de bun simt: 1. Nu faceti reclama unde nu trebuie ! 2. Nu injurati ca la usa cortului ! 3. Daca esti analfabeti, taci din gura ! 4. Nu abuza de 'scuze', 'din greseala' ! My work ::: http://pastebin.com/VRNRcaAs Link to comment Share on other sites More sharing options...
Ionut1 Posted November 5, 2018 Report Share Posted November 5, 2018 Iti recomand ZCMD CMD:gotols(playerid, params[]){ if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); { if(IsPlayerInAnyVehicle(playerid)) { DOO_SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3); } else { DOO_SetPlayerPos(playerid, 1529.6,-1691.2,13.3); } } return 1;} Quote Link to comment Share on other sites More sharing options...
Edyyy. Posted November 5, 2018 Report Share Posted November 5, 2018 (edited) poti face mai simplu eu recimand sa folosesti zcmd, #include <zcmd> dupa adaugi comanda CMD:gotols(playerid){ if(PlayerData[playerid][pAdmin] < 1 && PlayerData[playerid][pAgent] < 1) return SCM(playerid, COLOR_RED, "Nu ai gradul necesar"); SetPlayerPos(playerid, COORDONATELE); SCM(playerid, COLOR_YELLOW, "Ai fost teleportat in LS"); return 1; } Edited November 5, 2018 by Edyyy. Quote Link to comment Share on other sites More sharing options...
Banditul Posted November 5, 2018 Report Share Posted November 5, 2018 Nu stiu daca observati, dar tocmai ati dat bump la un topic din Mai 2015 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.