Cordyandrey Posted January 12, 2019 Report Share Posted January 12, 2019 Salut, folosesc /oplace ok pun cadoul si cand intra un civil in el apare asta.. apoi zice comanda nu exsita cand incerc sa pun iar, stie cineva de ce? Poza: https://imgur.com/a/adGo1Jl Code: CMD:oplace(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); 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,"{008080}Usage: {FFFFFF}/oplace <ObjectID> <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...
1 Cordyandrey Posted January 12, 2019 Author Report Share Posted January 12, 2019 Pana la urma am reusit! @AlexRap daca te pricepi la factiuni te rog mult sa-mi zici si mie ce e gresit la factiunea TAXI, am facut un topic incerc sa ma uit peste tot dar degeaba deci nu pot sa gasesc diferenta de 2 zile imi tot bat capul. Te rog. Quote Link to comment Share on other sites More sharing options...
0 Cordyandrey Posted January 12, 2019 Author Report Share Posted January 12, 2019 function OnPlayerPickUpPickup(playerid, pickupid) { if(eventobjects > 0) { if(PlayerInfo[playerid][pAdmin] < 1) { for(new obj; obj < 11; obj++) { if(pickupid == objectevent[obj]) { eventobjects--; new string[128],name[30]; GetPlayerName(playerid, name, sizeof(name)); GivePlayerCash(playerid, eventprizeobj[obj]); Update(playerid,pCashx); DestroyPickup(objectevent[obj]); format(string,sizeof(string),"NR AdmBot: Un obiect din event a fost gasit de %s. Acesta a castigat un premiu de $%s!",name,FormatNumber(eventprizeobj[obj])); OOCNews(COLOR_ORANGE,string); if(eventobjects > 0) { format(string,sizeof(string),"NR AdmBot: Eventul continua. Mai sunt %d obiecte de gasit!",eventobjects); } else { format(string,sizeof(string),"NR AdmBot: Eventul a luat sfarsit. Multumim pentru participare!"); } OOCNews(COLOR_ORANGE,string); objectevent[obj] = 0; eventprizeobj[obj] = 0; } } } } return 1; } Quote Link to comment Share on other sites More sharing options...
0 Cordyandrey Posted January 12, 2019 Author Report Share Posted January 12, 2019 Am postat si asta poate va ajuta! Quote Link to comment Share on other sites More sharing options...
0 AlexRap Posted January 12, 2019 Report Share Posted January 12, 2019 https://pastebin.com/0Kd2iDXv incearca asa si sa mi spui daca ti mai apare acolo unknown Quote Link to comment Share on other sites More sharing options...
Question
Cordyandrey
Salut, folosesc /oplace ok pun cadoul si cand intra un civil in el apare asta.. apoi zice comanda nu exsita cand incerc sa pun iar, stie cineva de ce?
Poza:
https://imgur.com/a/adGo1Jl
Code:
CMD:oplace(playerid, params[]) {
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
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,"{008080}Usage: {FFFFFF}/oplace <ObjectID> <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
4 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.