Simple request
#1

Hello, I've been unable to create this command, it's very simple, but for some reason I get errors. I need someone to create two commands, one is '/n'(noob chat), other is '/askq'(sends their question to all admins online) and finally '/answerq'(must notify the player using /askq and all the other admins online)

FYI: I don't use CMD:, or COMMAND:, I use this;
if(strcmp(cmd,"/commandhere",true)==0)



EXAMPLE:
Код HTML:
	if (strcmp(cmd, "/admins", true) == 0)
	{
        if(IsPlayerConnected(playerid))
	    {
	        new count = 0;
			SendClientMessage(playerid, COLOR_LIGHTGREEN, "On-Duty Administrators");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				    if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
				    {
						format(string, 256, "Administrator: %s - [%d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
						SendClientMessage(playerid, COLOR_WHITE, string);
						count++;
					}
				}
			}
			if(count == 0)
			{
				SendClientMessage(playerid,COLOR_WHITE,"There are currently no administrators on duty. ");
			}
			SendClientMessage(playerid, COLOR_LIGHTGREEN, "----------------------------------------------------------");
		}
		return 1;
	}
Reply
#2

Show us what you've done and what are the errors, I'll try to fix it for you instead of making you new commands.
Reply
#3

I deleted it already, I'll re-make a replica.
Reply
#4

Okay, this is the errors I get, I don't know how the fuck I got these errors.

Quote:

C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(119 : error 017: undefined symbol "ShowServerPassword"
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1490) : error 004: function "FixHour" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1532) : error 004: function "KickPlayer" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1549) : error 017: undefined symbol "ClearScreen"
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1550) : error 004: function "ShowScriptStats" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1552) : error 017: undefined symbol "RPName"
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1574) : error 004: function "KickPlayer" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1580) : error 004: function "LoadDynamicFactions" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1581) : error 004: function "LoadDynamicCars" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1582) : error 004: function "LoadCivilianSpawn" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1583) : error 004: function "LoadBuildings" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1584) : error 004: function "LoadHouses" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1585) : error 004: function "LoadBusinesses" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1586) : error 004: function "LoadFactionMaterialsStorage" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1587) : error 004: function "LoadFactionDrugsStorage" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(158 : error 004: function "LoadDrivingTestPosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1589) : error 004: function "LoadFlyingTestPosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1590) : error 004: function "LoadBankPosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1591) : error 004: function "LoadWeaponLicensePosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1592) : error 004: function "LoadPoliceArrestPosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1593) : error 004: function "LoadPoliceDutyPosition" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1594) : error 004: function "LoadGunJob" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1595) : error 004: function "LoadDrugJob" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1596) : error 004: function "LoadDetectiveJob" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(1597) : error 004: function "LoadLawyerJob" is not implemented
C:\Users\Zachary.Zach-HP.000\Desktop\Folders\SA-MP\Fort Carson Roleplay\gamemodes\crp.pwn(159 : error 004: function "LoadProductsSellerJob" is not implemented





So, my command I created is completely fucked.
Reply
#5

Mind showing the command you created? Because I guess these errors have nothing to do with your command.
Reply
#6

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Mind showing the command you created? Because I guess these errors have nothing to do with your command.
No, the command deletes like a large chunk of my script, I don't know why. Anyways, I deleted the CMD again, I'm an idiot.
Reply
#7

Anyone?
Reply
#8

pawn Код:
CMD:ask(playerid,params[])
{
    new string[150],msg[150],name[24];
    GetPlayerName(playerid,name,sizeof(name));
    if(sscanf(params,"s[150]",msg)) return SendClientMessage(playerid,-1,"/ask [Question] (150 letters MAX)");
    foreach(Player, i)
    {
        if (PlayerInfo[i][pAdmin] >= 1)
        {
                format(string,sizeof(string),"[QUESTION] %s has asked %s.",name,msg);
                SendClientMessage(playerid,-1,string);
        }
    }
    return 1;
}
Untested.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)