Commands not working.
#1

So, recently I added some commands to my script, pawno compiled them fine and I uploaded them and it says "Unknown command".
If you could help me, that'd be awesome.
Код:
CMD:knife(playerid, params[]) {
	if(playerVariables[playerid][pGroup] == 10);
	SpawnPlayerWeapon(playerid, 4, 1);
	}
	return 1;
}
CMD:resetbook(playerid, params[]) {
  if(playerVariables[playerid][pPhoneBook] == 1};
  playerVariables[playerid][pPhoneBook] == 1;
  return 1;
}
CMD:requestevent(playerid, params[]) {
		if(playerVariables[playerid][pAdminLevel] >= 3;
		SendClientMessage(playerid, COLOUR_ORANGE, "%d has requested an event, /pm them to find out more information.", playerid);
   }
}
I'm using vortex roleplay 2, and I've added it to the bottom of the script.
I'm also a newb to pawno...so..
Reply
#2

pawn Код:
CMD:knife(playerid, params[])
{
    if(playerVariables[playerid][pGroup] == 10) SpawnPlayerWeapon(playerid, 4, 1);
    return 1;
}
CMD:resetbook(playerid, params[])
{
    if(playerVariables[playerid][pPhoneBook] == 1) playerVariables[playerid][pPhoneBook] = 0; //I suspect you want to set it to 0 instead of 1
    return 1;
}
CMD:requestevent(playerid, params[])
{
    if(playerVariables[playerid][pAdminLevel] >= 3)
    {
        new string[128];
        format(string, sizeof(string), "%d has requested an event, /pm them to find out more information.", playerid);
        SendClientMessage(playerid, COLOUR_ORANGE, string);
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/Control_Structures#if
Reply
#3

I've tried that, but it still isn't working?
Reply
#4

Do you have CMD and OnPlayerCommandText?
Reply
#5

Er, what do you mean?
VX-RP commands run like,
CMD:
I initially did OnPlayerCommandText, but then I converted it, realising it may not work because the rest was CMD:
Reply
#6

Help?
Reply
#7

Quote:
Originally Posted by Jack.7331
Посмотреть сообщение
Help?
Make sure you don't use strcmp commands with Zcmd. It get's conflict and the command do not work. Check if you have OnPlayerCommandText, remove the whole callback, include Zcmd and compile, I am sure you are doing something wrong, check and I am sure it will work.

-FalconX
Reply
#8

None of those.
I'm using VX-RP, which uses Zcmd. I can't find any "OnPlayerCommandText" either?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)