Jump to content
  • 0

Problema comanda [/requestevent].


MrAndrei

Question

Problema intalnita (descriere):Comanda [/requestevent].
Ero(area / rile) / warning-(ul / urile):Cand tastez comanda in game nu functioneaza.
Liniile de cod / sursa / script-ul(obligatoriu):

Comanda : 

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
  if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
    if(strlen(title) < 0 || strlen(title) > 0)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 0 || strlen(location) > 50)   return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new dstring[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(string, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(string, sizeof(dstring), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    format(string, sizeof(dstring), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
    SendClientMessage(playerid, 0xFFFFFFFF, dstring);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(string, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
format(string, sizeof(dstring), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
    ABroadCast(0xFFFFFFFF,dstring,1);
format(string, sizeof(dstring), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
return 1;
}

 

Tastez [/requestevent] si apare textul : "Invalid amount of characters in title." , iar daca tastez [/requestevent test] imi spune ca serverul nu cunoaste comanda.

Imagini / Video (optional):

 

Cand tastez [/requestevent] :

 

txaCbd2.jpg

 

Cand tastez vreau sa pun titlu ex: [/requestevent Duele Deagle la GSLS] [ Titlu ] :

 

x1dDOBX.jpg

Ati incercat sa rezolvati singur?:Da, dar nu am reusit

Edited by MrAndrei
Link to comment
Share on other sites

Recommended Posts

  • 0

In unele locuri inloc sa pui dstring ai pus doar string. Poftim incearca asa:

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 0 || strlen(title) > 0)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 0 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new dstring[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
return 1;
}
Edited by andy47
Link to comment
Share on other sites

  • 0

 

In unele locuri inloc sa pui dstring ai pus doar string. Poftim incearca asa:

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 0 || strlen(title) > 0)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 0 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new dstring[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
return 1;
}

 

Acum functioneaza , insa nu pot sa pun descrierile, textul , titlul. timpul etc etc

 

Poza:

 

ToNzLlv.png

Link to comment
Share on other sites

  • 0

 

Banuiesc ca ai scris asa:

 

 

 

Trebuie sa pui

 

intre titlu si locatie..etc

 

 

 

Banuiesc ca ai scris asa:

 

 

 

Trebuie sa pui

 

intre titlu si locatie..etc

 

 

Pai cand tastez comanda [/requestevent] imi afiseaza datele din poza.

Link to comment
Share on other sites

  • 0

Incearca:

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 0 || strlen(title) > 0)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 0 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new string[256],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, string);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
return 1;
}

Daca ti-am fost de ajutor +1 Respect!Multumesc

Link to comment
Share on other sites

  • 0

EDIT: Am adaugat ce mi-ai zis tu , insa acum apare asa :

 

 

Am testat si cum ai zis tu :

 

Poza :  ADITAOA.png

/requestevent <Title|Location|Time|Description|Prize>

Si imi da "Server unknown the command".

Edited by MrAndrei
Link to comment
Share on other sites

  • 0

Incearca acum:

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 1 || strlen(title) > 50)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new dstring[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
return 1;
}

Daca ti-am fost de ajutor +1 Respect!Multumesc

Link to comment
Share on other sites

  • 0

 

Incearca acum:

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi  mai intai.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_DS,"{37B9C8}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}You're already requesting an event, cancel it first.");
new title[50], location[50], description[100], prize, time[50];
if(sscanf( "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 1 || strlen(title) > 50)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in title.");
if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000)  return SendClientMessage(playerid, 0xFFFFFFFF, "{37B9C8}Invalid prize amount.");
new dstring[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
format(dstring, sizeof(dstring), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, dstring);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(dstring, sizeof(dstring), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,dstring,1);
format(dstring, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,dstring,1);
return 1;
}

 

Imi pare foarte rau pentru stresul creat..

Inca nu s-a rezolvat:

 

Poza:

 

hK1aXMI.jpg

 

Iar daca pun [/requestevent test] imi afiseaza ca serverul nu cunoaste comanda.

Link to comment
Share on other sites

  • 0

Poftim,incearca..Asta e de la gm-ul meu,ar trebui sa mearga.la mine functioneaza...

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
	if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
	if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
	new title[50], location[50], description[100], prize, time[50];
	if(sscanf(params, "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
	if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
	if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
	if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
	if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
	if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
	new string[1000],name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	requestingevent[playerid] = 1;
	strmid(requestingtitle[playerid], title, 0, strlen(title));
	strmid(requestinglocation[playerid], location, 0, strlen(location));
	strmid(requestingdescription[playerid], description, 0, strlen(description));
	requestingprize[playerid] = prize;
	strmid(requestingtime[playerid], time, 0, strlen(time));
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	SendClientMessage(playerid, 0xFFFFFFFF, string);
	format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
   	format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
	SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
   	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	return 1;
	}

Daca ti-am fost de ajutor +1 Respect!Multumesc

Link to comment
Share on other sites

  • 0

 

Poftim,incearca..Asta e de la gm-ul meu,ar trebui sa mearga.la mine functioneaza...

if(!strcmp(cmdtext, "/requestevent", true) || !strcmp(cmdtext, "/reqe", true)) // By AlyN
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
	if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
	if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
	new title[50], location[50], description[100], prize, time[50];
	if(sscanf(params, "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
	if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
	if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
	if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
	if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
	if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
	new string[1000],name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	requestingevent[playerid] = 1;
	strmid(requestingtitle[playerid], title, 0, strlen(title));
	strmid(requestinglocation[playerid], location, 0, strlen(location));
	strmid(requestingdescription[playerid], description, 0, strlen(description));
	requestingprize[playerid] = prize;
	strmid(requestingtime[playerid], time, 0, strlen(time));
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	SendClientMessage(playerid, 0xFFFFFFFF, string);
	format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
   	format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
	SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
   	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	return 1;
	}

 

 

Erori :

C:UsersAAADesktopGameMode RiseGamminGgamemodesfGaming.pwn(36431) : error 017: undefined symbol "params"
C:UsersAAADesktopGameMode RiseGamminGgamemodesfGaming.pwn(36437) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Linia 36437:

	new string[1000],name[MAX_PLAYER_NAME];

Linia 36431

	if(sscanf(params, "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");

La linia 36437 am schimbat in dstring[1000]....

Am schimbat peste tot ..

Link to comment
Share on other sites

  • 0

Da, insa, cand pun datele necesare , imi afiseaza ca serverul nu cunoaste comanda.

Chiar imi pare rau, pentru stresul creat angel.

 

Poze :

 

pKtUNVO.jpg

 

UACTCBH.jpg

 

nwYE0Fa.jpg

Edited by MrAndrei
Link to comment
Share on other sites

  • 0
CMD:requestevent(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
	if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
	if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
	new title[50], location[50], description[100], prize, time[50];
	if(sscanf(params, "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
	if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
	if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
	if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
	if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
	if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
	new string[1000],name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	requestingevent[playerid] = 1;
	strmid(requestingtitle[playerid], title, 0, strlen(title));
	strmid(requestinglocation[playerid], location, 0, strlen(location));
	strmid(requestingdescription[playerid], description, 0, strlen(description));
	requestingprize[playerid] = prize;
	strmid(requestingtime[playerid], time, 0, strlen(time));
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	SendClientMessage(playerid, 0xFFFFFFFF, string);
	format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
   	format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
	SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
   	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	return 1;
}

Incearca asa : 

 

 

Si in game scrie asa : 

 

/requestevent Deagle | Los Santos | Acum | /e | 10000 

Link to comment
Share on other sites

  • 0
CMD:requestevent(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
	if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
	if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
	new title[50], location[50], description[100], prize, time[50];
	if(sscanf(params, "p<|>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
	if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
	if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
	if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
	if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
	if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
	new string[1000],name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	requestingevent[playerid] = 1;
	strmid(requestingtitle[playerid], title, 0, strlen(title));
	strmid(requestinglocation[playerid], location, 0, strlen(location));
	strmid(requestingdescription[playerid], description, 0, strlen(description));
	requestingprize[playerid] = prize;
	strmid(requestingtime[playerid], time, 0, strlen(time));
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	SendClientMessage(playerid, 0xFFFFFFFF, string);
	format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
   	format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
   	SendClientMessage(playerid, 0xFFFFFFFF, string);
	SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
	format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
   	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
	ABroadCast(0xFFFFFFFF,string,1);
	format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
	ABroadCast(0xFFFFFFFF,string,1);
	return 1;
}

Incearca asa : 

 

 

Si in game scrie asa : 

 

/requestevent Deagle | Los Santos | Acum | /e | 10000 

 

 

Gamemode-ul nu e pe baza de date.

Am tastat ce mi-ai zis tu , si la fel, imi zice ca serverul nu cunoaste comanda!

Link to comment
Share on other sites

  • 0

Incearca asa: (Pui comanda la sfarsitul GM-ului):

CMD:requestevent(playerid, params[])
{
    new title[50], location[50], description[100], prize, time[50];
    new string[1000],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
if(sscanf(params, "p</>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
 
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
 
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
    ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
 
return 1;
}

Comanda o scrii asa:

/requestevent Title/Location/Time/Description/Prize

Edited by #Teddy

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

Link to comment
Share on other sites

  • 0

Incearca asa: (Pui comanda la sfarsitul GM-ului):

CMD:requestevent(playerid, params[])
{
    new title[50], location[50], description[100], prize, time[50];
    new string[1000],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
if(sscanf(params, "p</>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
 
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
 
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
    ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
 
return 1;
}

Comanda o scrii asa:

/requestevent Title/Location/Time/Description/Prize

 

Gamemode nu este pe baza de date, degeaba incerci sa imi faci comanda in mod <zcmd>

Link to comment
Share on other sites

  • 0

Erori : 

C:UsersAndreiDesktopGameMode RiseGamminGGameMode RiseGamminGgamemodesfGaming.pwn(35912) : error 017: undefined symbol "requestevent"
C:UsersAndreiDesktopGameMode RiseGamminGGameMode RiseGamminGgamemodesfGaming.pwn(35921) : error 017: undefined symbol "params"
C:UsersAndreiDesktopGameMode RiseGamminGGameMode RiseGamminGgamemodesfGaming.pwn(35997) : warning 225: unreachable code
C:UsersAndreiDesktopGameMode RiseGamminGGameMode RiseGamminGgamemodesfGaming.pwn(35912) : warning 203: symbol is never used: "CMD"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

Linia 35912 :

CMD:requestevent(playerid, params[])
{
new title[50], location[50], description[100], prize, time[50];format(dstring, sizeof(dstring), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);

Linia 35950 :

[...]
ABroadCast(0xFFFFFFFF,string,1);
return 1;
}
    if(strcmp(cmd, "/acceptreport", true) == 0 || strcmp(cmd, "/ar", true) == 0) // By me
{
   if(IsPlayerConnected(playerid))
   {
       if(gPlayerLogged[playerid] == 0)
         [...]

Linia 35921

if(sscanf(params, "p</>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
Link to comment
Share on other sites

  • 0

Vezi:

if(!strcmp(cmdtext, "/requestevent", true))
{
new title[50], location[50], description[100], prize, time[50];
new string[1000],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
 if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(PlayerInfo[playerid][pWantedLevel] > 0) return SCM(playerid,COLOR_WHITE,"{FFB870}You`re being chased by police, you can`t make an event.");
if(activeevent == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}There's already an active event.");
if(requestingevent[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}You're already requesting an event, cancel it first.");
if(sscanf(params, "p</>s[50]s[50]s[50]s[100]d", title, location, time, description, prize)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /requestevent <Title|Location|Time|Description|Prize>");
if(strlen(title) < 1 || strlen(title) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in title.");
if(strlen(location) < 1 || strlen(location) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in location.");
if(strlen(time) < 1 || strlen(time) > 50) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in time.");
if(strlen(description) < 1 || strlen(description) > 100) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid amount of characters in description.");
if(prize < 1 || prize > 5000000) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFB870}Invalid prize amount.");
requestingevent[playerid] = 1;
strmid(requestingtitle[playerid], title, 0, strlen(title));
strmid(requestinglocation[playerid], location, 0, strlen(location));
strmid(requestingdescription[playerid], description, 0, strlen(description));
requestingprize[playerid] = prize;
strmid(requestingtime[playerid], time, 0, strlen(time));
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Title: %s Prize: $%s Location: %s Time: %s",title,FormatNumber(prize), location, time);
SendClientMessage(playerid, 0xFFFFFFFF, string);
format(string, sizeof(string), "{FFFF00}Event: Organizer: %s Description: %s",name,description);
SendClientMessage(playerid, 0xFFFFFFFF, string);
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Your event is pending approval from an admin, please wait.");
format(string, sizeof(string), "{FFFF00}Event %d has been requested, details are below.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Title: %s Prize: $%s Location: %s Time: %s",playerid,title,FormatNumber(prize), location, time);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Event %d: Organizer: %s Description: %s",playerid,name,description);
ABroadCast(0xFFFFFFFF,string,1);
format(string, sizeof(string), "{FFFF00}Use [/acceptevent %d] to accept this event.", playerid);
ABroadCast(0xFFFFFFFF,string,1);
return 1;
}

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.