so I am trying to make an event system with dialogs but the dialogs didn't work cause I only have the .amx of the script so I tried to make it with cmds but I get the following errors
Код:
CMD:event1(playerid, params[])
{
new option[128], player[128];
if(sscanf(params, "us", option))
{
SendClientMessage(playerid, YELLOW, "{FFFFFF} /event1 [id]");
SendClientMessage(playerid, YELLOW, "{FFFFFF} ID:0 ");
return 1;
}
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
{
if (strcmp(option, "0", true) == 0)
{
new pos[132];
new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
if(EventInfo[EventEnabled1] == 0) return SendClientMessage(playerid, 0xAA3333AA, "{6EF83C}[ERROR]: This Event Is Disabled!!");
SetPlayerPos(playerid, 4166.66, 535.80, 63.18);
SendClientMessage(playerid, 0x33AA33AA, "Welcome to the Fast And Furious!");
format(string, sizeof(string), "%s joined Fast And Furious Join Him /events", name);
SendClientMessageToAll(0xAA3333AA, string);
InEvent[Eventr]=1;
}
}
return 1;
}
CMD:event2(playerid, params[])
{
new option[128], player[128];
if(sscanf(params, "us", option))
{
SendClientMessage(playerid, YELLOW, "{FFFFFF} /event [team]");
SendClientMessage(playerid, YELLOW, "{FFFFFF} Team:1, 2");
return 1;
}
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
{
if (strcmp(option, "1", true) == 0)
{
new pos[132];
new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z;
new color;
new skind;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerColor(playerid, color);
GetPlayerSkin(playerid, skind);
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
if(EventInfo[EventEnabled2] == 0) return SendClientMessage(playerid, 0xAA3333AA, "{6EF83C}[ERROR]: This Event Is Disabled!!");
SetPlayerPos(playerid, -1298.76, 490.54, 11.19);
SetPlayerColor(playerid, BLUE);
SetPlayerSkin(playerid, 73);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 24, 999);
SendClientMessage(playerid, 0x33AA33AA, "Welcome to the Missionary Team 1 !");
format(string, sizeof(string), "%s joined Missionary Join Him /events", name);
SendClientMessageToAll(0xAA3333AA, string);
InEvent[Eventd]=1;
}
if (strcmp(option, "2", true) == 0)
{
new pos[132];
new name[MAX_PLAYER_NAME], string[23 + MAX_PLAYER_NAME];
new Float:X, Float:Y, Float:Z;
new color;
new skind;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerSkin(playerid, skind);
GetPlayerColor(playerid, color);
GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
if(EventInfo[EventEnabled2] == 0) return SendClientMessage(playerid, 0xAA3333AA, "{6EF83C}[ERROR]: This Event Is Disabled!!");
SetPlayerPos(playerid, -1385.60, 507.27, 3.03);
SetPlayerColor(playerid, RED);
SetPlayerSkin(playerid, 108);
GivePlayerWeapon(playerid, 31, 999);
GivePlayerWeapon(playerid, 24, 999);
SendClientMessage(playerid, 0x33AA33AA, "Welcome to the Missionary Team 2 !");
format(string, sizeof(string), "%s joined Missionary Join Him /events", name);
SendClientMessageToAll(0xAA3333AA, string);
InEvent[Eventd]=1;
}
}
return 1;
}
CMD:eevent(playerid, params[])
{
new option[128], player[128];
if(sscanf(params, "us", option))
{
SendClientMessage(playerid, YELLOW, "{FFFFFF} /eevent[option]");
SendClientMessage(playerid, YELLOW, "{FFFFFF} option 1, 2");
return 1;[917]
}
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
{
if (strcmp(option, "1", true) == 0)
{
EventInfo[EventEnabled1]=1;
SendClientMessage(playerid, 0x0000BBAA, "Event Enabled");
SendClientMessageToAll(0x0000BBAA, " Fast And Furious Event Have Been Enabled By An Admin [/event1 0 1]");
if (strcmp(option, "2", true) == 0)
{
EventInfo[EventEnabled2]=1;
SendClientMessage(playerid, 0x0000BBAA, "Event Enabled");
SendClientMessageToAll(0x0000BBAA, "Missionary Event Have Been Enabled By An Admin [/events 1 [team 1, 2]]");
}
}
return 1;[937]
}
CMD:devent(playerid, params[])[939]
{
new option[128], player[128];
if(sscanf(params, "us", option))
{
SendClientMessage(playerid, YELLOW, "{FFFFFF} /devent[option]");
SendClientMessage(playerid, YELLOW, "{FFFFFF} option 1, 2");
return 1;
}
new name[MAX_PLAYER_NAME], file[256], string[128];
GetPlayerName(playerid, name, sizeof(name));
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
{
if (strcmp(option, "1", true) == 0)
{
EventInfo[EventEnabled1]=0;
SendClientMessage(playerid, 0x0000BBAA, "Event dISABLED");
SendClientMessageToAll(0x0000BBAA, " Fast And Furious Event Have Been Disabled By An Admin");
if (strcmp(option, "2", true) == 0)
{
EventInfo[EventEnabled2]=0;
SendClientMessage(playerid, 0x0000BBAA, "Event Disabled");
SendClientMessageToAll(0x0000BBAA, "Missionary Event Have Been Disabled By An Admin");
}
}
return 1;
}