adv1337 Posted November 6, 2019 Report Share Posted November 6, 2019 \pawno\include\SW.inc(204) : error 001: expected token: ";", but found "if" EROAREA COD: CMD:oplace(playerid, params[], help) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!"); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly); if(eventobjects > 9) return SCM(playerid, COLOR_WHITE,"You can't place more than 10 objects."); new objectid,prize,sendername[30],Float:pX,Float:pY,Float:pZ,string[128]; if(sscanf(params, "dd",objectid,prize)) { SendClientMessage(playerid, COLOR_WHITE,"{AB0000}Usage: {FFFFFF}/oplace <Object (Id object)> <Prize>"); SendClientMessage(playerid, COLOR_WHITE,"[OBJECTS] Cadou: 19054 - 19058 | Glob craciun: 19059 - 19063 | Oua paste: 19341 - 19345"); return 1; } if(prize < 1 || prize > 10000000) return SendClientMessage(playerid, COLOR_WHITE, "Prize must be between $1 and $10,000,000."); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerPos(playerid,pX,pY,pZ); eventobjects++; objectevent[eventobjects] = CreatePickup(objectid, 1, pX+2,pY,pZ, -1); eventprizeobj[eventobjects] = prize; format(string,sizeof(string),"Admin %s[admin:%d] started an event. Object: %d, prize: $%s.",sendername,PlayerInfo[playerid][pSQLID],objectid,FormatNumber(prize)); ABroadCast(COLOR_RED2, string,1); Adminlog(string); return 1; } Quote Link to comment Share on other sites More sharing options...
0 Koqs Posted November 9, 2019 Report Share Posted November 9, 2019 Si linia trebuie sa o ghicim? Quote Link to comment Share on other sites More sharing options...
0 adv1337 Posted November 11, 2019 Author Report Share Posted November 11, 2019 Cand comanda e activata cu toate define-urile da eroare la un alt define carr e totul inregula cu el, comanda asta e pe la linia 30k.. Quote Link to comment Share on other sites More sharing options...
0 Koqs Posted November 11, 2019 Report Share Posted November 11, 2019 Acum vad ca tu ai o problema la include-uri \pawno\include\SW.inc(204) : error 001: expected token: ";", but found "if" EROAREA anume SW.inc la linia 204 Quote Link to comment Share on other sites More sharing options...
0 adv1337 Posted November 11, 2019 Author Report Share Posted November 11, 2019 Si ce as putea sa fac, incat sa ma poti lamuri? Quote Link to comment Share on other sites More sharing options...
0 Koqs Posted November 12, 2019 Report Share Posted November 12, 2019 Da-ti update la include si vezi daca mai e vreo problema, daca nu ai nevoie de el il stergi ca eroare nu e din comanda /oplace ci din un include Quote Link to comment Share on other sites More sharing options...
0 adv1337 Posted November 13, 2019 Author Report Share Posted November 13, 2019 Cum as putea sa dau update la include? Daca ma pot lamurii,te rog! Quote Link to comment Share on other sites More sharing options...
0 BaFFyJunior Posted November 13, 2019 Report Share Posted November 13, 2019 Cauta sw include samp pe google, descarca-l si pune-l in pawno-include. In loc de sw poti pune numele includeului tau. Quote Link to comment Share on other sites More sharing options...
0 adv1337 Posted November 13, 2019 Author Report Share Posted November 13, 2019 Problema asta s-a rezolvat, comanda merge, totul e in regula si frumos, dar cand intru in obiect nu dispare, solutii? eventual discord pentru a vorbii in timp real Quote Link to comment Share on other sites More sharing options...
0 BaFFyJunior Posted November 14, 2019 Report Share Posted November 14, 2019 Ia coordonatele obiectului cu GetObjectPos, apoi foloseste functia isplayerinrangeofpoint si vezi daca e in raza obiectului. Daca e la 5.0 sa zicem da-i destroy la obiect cu destroyobject. Cam asta ar fi in mare povestea. Quote Link to comment Share on other sites More sharing options...
0 Koqs Posted November 14, 2019 Report Share Posted November 14, 2019 (edited) Faza este de la OnPlayerPickUpPickup uite cum am eu in gamemode-ul meu incearca si vezi daca poti inlocuii la gamemode-ul tau public OnPlayerPickUpPickup(playerid, pickupid) { new string[256]; for(new i = 0; i < MAX_OBJECTS; i++) { if(pickupid == ObjectID[i] && ObjectID[i] != -1) { if(PlayerInfo[playerid][pAdmin] != 0) return SCM(playerid, COLOR_ERROR, "Eroare:{FFFFFF}Nu poti colecta acest cadou deoarece esti admin!"); new id = CountObjects(); format(string, sizeof(string), "NR AdmBot: %s a gasit un obiect din event si a castigat $%d.", GetName(playerid), ObjectMoney[i]); SendClientMessageToAll(0xFF8800FF, string); GivePlayerMoney(playerid, ObjectMoney[i]); if(id-1 > 1) format(string, sizeof(string), "NR AdmBot: In acest moment mai sunt %d obiecte disponibile.", id-1); else if(id-1 == 1) format(string, sizeof(string), "NR AdmBot: In acest moment mai este un singur obiect disponibil."); else if(id-1 == 0)format(string, sizeof(string), "NR AdmBot: Evenimentul a luat sfarsit! Multumim pentru participare."); SendClientMessageToAll(0xFF8800FF, string); DestroyPickup(ObjectID[i]); ObjectID[i] = -1; ObjectMoney[i] = 0; } } return 1; } Edited November 14, 2019 by Koqs Quote Link to comment Share on other sites More sharing options...
0 adv1337 Posted November 14, 2019 Author Report Share Posted November 14, 2019 @Koqs un discord, eventual sa vorbim in timp real, probleme peste probleme. Quote Link to comment Share on other sites More sharing options...
-1 Kayaba Posted November 13, 2019 Report Share Posted November 13, 2019 Discord: Gabriel98#5966 Da-mi msj dupa ora 23:00 si te ajut cu mare placere ! Seara faina ! Quote Link to comment Share on other sites More sharing options...
Question
adv1337
\pawno\include\SW.inc(204) : error 001: expected token: ";", but found "if" EROAREA
COD:
CMD:oplace(playerid, params[], help) {
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Nu esti logat!");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly);
if(eventobjects > 9) return SCM(playerid, COLOR_WHITE,"You can't place more than 10 objects.");
new objectid,prize,sendername[30],Float:pX,Float:pY,Float:pZ,string[128];
if(sscanf(params, "dd",objectid,prize))
{
SendClientMessage(playerid, COLOR_WHITE,"{AB0000}Usage: {FFFFFF}/oplace <Object (Id object)> <Prize>");
SendClientMessage(playerid, COLOR_WHITE,"[OBJECTS] Cadou: 19054 - 19058 | Glob craciun: 19059 - 19063 | Oua paste: 19341 - 19345");
return 1;
}
if(prize < 1 || prize > 10000000) return SendClientMessage(playerid, COLOR_WHITE, "Prize must be between $1 and $10,000,000.");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playerid,pX,pY,pZ);
eventobjects++;
objectevent[eventobjects] = CreatePickup(objectid, 1, pX+2,pY,pZ, -1);
eventprizeobj[eventobjects] = prize;
format(string,sizeof(string),"Admin %s[admin:%d] started an event. Object: %d, prize: $%s.",sendername,PlayerInfo[playerid][pSQLID],objectid,FormatNumber(prize));
ABroadCast(COLOR_RED2, string,1);
Adminlog(string);
return 1;
}
Link to comment
Share on other sites
12 answers to this question
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.