case DIALOG_EVENTNAME:
{
if(response)
{
new ename[50],string[100];
if(strcmp(ename,"%s",true))
{
playerid = adminevent[playerid];
eventteleports = 1;
eventon = 1;
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~10,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 2)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~100,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 3)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~500,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~1,000,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
}
}
case DIALOG_EVENTNAME:
{
if(response)
{
new ename[50],string[100];
if(strcmp(ename,"%s",true))//check this
{
playerid = adminevent[playerid];
eventteleports = 1;
eventon = 1;
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~10,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 2)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~100,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 3)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~500,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~1,000,000~n~~w~type ~r~ /yes~w~ to join!",ename);
GameTextForAll(string,3000,5);
}
}
}
|
pawn Код:
|
|
What the hell is this even?
Also you should really just assign the reward to another variable so you'll only have to format and send the message once. |
|
What the hell is this even?
Also you should really just assign the reward to another variable so you'll only have to format and send the message once. |
|
your string is inputtext so replace all ename to inputtext without strcmp
|
case DIALOG_EVENTNAME:
{
if(response)
{
new string[100];
playerid = adminevent[playerid];
eventteleports = 1;
eventon = 1;
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~10,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
GameTextForAll(string,3000,5);
}
if(eventamount == 2)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~100,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
GameTextForAll(string,3000,5);
}
if(eventamount == 3)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~500,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
GameTextForAll(string,3000,5);
}
if(eventamount == 1)
{
format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~1,000,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
GameTextForAll(string,3000,5);
}
}
case DIALOG_EVENTNAME:
{
if(response)
{
new string[128];
playerid = adminevent[playerid];
eventteleports = 1;
eventon = 1;
switch(eventamount)
{
case 1: format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~10,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
case 2: format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~100,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
case 3: format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~500,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
case 4: format(string,sizeof(string),"~b~ %s~w~ has started! price : ~g~$~w~1,000,000~n~~w~type ~r~ /yes~w~ to join!",inputtext);
}
GameTextForAll(string,3000,5);
}
}