Код:
CMD:gunin(playerid, params[]) return cmd_gin(playerid, params);
CMD:gin(playerid, params[])
{
new gout[10];
if (!sscanf(params, "s[10]", gout))
{
if(!strcmp(gout, "ak47", true) || !strcmp(gout, "ak-47", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s AK-47 on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "m4", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s M4 on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "sniper", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s sniper on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "rifle", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s hunting rifle on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "eaglec", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s .50 AE Desert Eagle back on %s gun holster.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "eagle", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on lifts %s shirt and places %s .50 AE Desert Eagle under it.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "shotgun", true) || !strcmp(gout, "sgun", true))
{
new string[256];
format(string,sizeof(string), "* %s places %s shotgun on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
/*
else if(!strcmp(gout, "spas12", true) || !strcmp(gout, "s12", true))
{
new string[256];
format(string,sizeof(string), "* %s places %s automated pump shotgun on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
*/
else if(!strcmp(gout, "mp5", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s MP5 under %s shirt.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "mp5c", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s MP5 on %s back.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "9mm", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on, lifts %s shirt and places %s 9mm under it.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "9mmc", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s 9mm back on %s gun holster.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "s9mm", true))
{
new string[256];
format(string,sizeof(string), "* %s flips the safety switch on and places %s silenced 9mm back on %s gun holster.", HitNameEx(playerid), HisHer(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "bat", true))
{
new string[256];
format(string,sizeof(string), "* %s puts down the baseball bat.", PlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, " Invalid gun name!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gin [Gun Name] or / gunin [Gun Name]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Gun Names: AK-47 (ak47), M4, Sniper, Rifle, Eaglec, Eagle, Shotgun (sgun), MP5, 9mm, 9mmc, s9mm, bat");
}
return 1;
}
CMD:gunout(playerid, params[]) return cmd_gout(playerid, params);
CMD:gout(playerid, params[])
{
new gout[10];
if (!sscanf(params, "s[10]", gout))
{
if(!strcmp(gout, "ak47", true) || !strcmp(gout, "ak-47", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out an AK-47 from %s back and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "m4", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out an M4 from %s back and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "sniper", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a sniper rifle from %s back and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "rifle", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a hunting rifle from %s back and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "eagle", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a .50 AE Desert Eagle from %s gun holster and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "shotgun", true) || !strcmp(gout, "sgun", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a shotgun from %s back and cocks it.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
/*
else if(!strcmp(gout, "spas12", true) || !strcmp(gout, "s12", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out an automated pump shotgun from %s back and cocks it.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
*/
else if(!strcmp(gout, "mp5", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out an MP5 from %s back and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "9mm", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a 9mm from %s gun holster and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "s9mm", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a silenced 9mm from %s gun holster and flips the safety switch off.", HitNameEx(playerid), HisHer(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else if(!strcmp(gout, "bat", true))
{
new string[256];
format(string,sizeof(string), "* %s takes out a baseball bat.", PlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, " Invalid gun name!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Gout [Gun Name]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Gun Names: AK-47 (ak47), M4, Sniper, Rifle, Eagle, Shotgun (sgun), MP5, 9mm, s9mm, bat");
}
return 1;
}
Undefined Symbol means that you have not defined the item..
And see if it has been set somewhere else, or describe what you want them to do..
You cannot paste commands like that into a mode and except it to be compiled. Go to the place you got the command from and search for HitNameEx and PlayerNameEx functions.
Go to the GM you copy'ed this from, take everything thats related to it, anything, defines, stocks, whatever, it will solve your problem.