Normal cmds not working all of a sudden (getting 2 old for this)
#1

well i made simple basic cmds they worked fine for over a year now all of a sudden its stopped working

Here's some cmds that are as basic as they get but yet dont work

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/pee", cmdtext, true, 4) == 0)
	{
		SetPlayerSpecialAction(playerid, 68);
		return 1;
	}

	if (strcmp("/Smoke", cmdtext, true, 6) ==0)
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0xFFFF00AA, "To smoke, use the left mouse buttom.");
        return 1;
 	}
 	
 	if (strcmp("/handsup", cmdtext, true, 8) ==0)
	{
	    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
        SendClientMessage(playerid, 0xFFFF00AA, "Presh enter to stop the annim");
        return 1;
 	}
 	
        if (strcmp("/drink", cmdtext, true, 6) ==0)
	{
	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0xFFFF00AA, "To Drink, use the left mouse buttom");
        return 1;
 	}
 	
 	if (strcmp("/dance", cmdtext, true, 6) ==0)
	{
	    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
        return 1;
 	}
	
	if (strcmp("/anims", cmdtext, true, 6) ==0)
	{
		SendClientMessage(playerid, 0xFFFFFFFF, ".::Anims List::.");
		SendClientMessage(playerid, 0xFFFFFFFF, "/pee, /smoke, /handsup, /drink, /dance");
		return 1;
	}
	
	if (strcmp("/rules", cmdtext, true, 6) == 0)
	{
	    SendClientMessage(playerid, 0xFFFFFFFF, ".::Rules::.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#1.Keep Profane Language to a Minimum.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#2.No Spamming or Adverts.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#3.No intentional spawnkilling.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#4.Do not bother people who do not want to be bothered.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#5.Please report anything you see via /report [id] (reason) or use the forums.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#6.Please check /help  & /help2 before approaching an admin for help.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#7.Don't ask anyone for admin or money, PERIOD!!");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#8.Do not hack, cheat, or use third party mods that affect multiplayer gameplay.");
	    SendClientMessage(playerid, 0xFFFFFFFF, "#9.Please respect all admins and PCRP Members and what they ask of you.");
	    return 1;
	}
        return 0;
}
NOTE:
my indentation is correct its just when i copied n pasted it it came out a little off

anyone got any idea's why all of a sudden its crapped out on me?
Reply
#2

Use ZCMD.

pawn Код:
#include <ZCMD>


CMD:pee(playerid, params[])
{
    SetPlayerSpecialAction(playerid, 68);
    return 1;
}

CMD:smoke(playerid, params[])
{
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
    SendClientMessage(playerid, 0xFFFF00AA, "To smoke, use the left mouse buttom.");
    return 1;
}

CMD:handsup(playerid, params[])
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
    SendClientMessage(playerid, 0xFFFF00AA, "Presh enter to stop the annim");
    return 1;
}

CMD:drink(playerid, params[]_
{
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
    SendClientMessage(playerid, 0xFFFF00AA, "To Drink, use the left mouse buttom");
    return 1;
}

CMD:dance(playerid, params[])
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    return 1;
}

CMD:anims(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, ".::Anims List::.");
    SendClientMessage(playerid, 0xFFFFFFFF, "/pee, /smoke, /handsup, /drink, /dance");
    return 1;
}

CMD:rules(playerid, params[])
{
    SendClientMessage(playerid, 0xFFFFFFFF, ".::Rules::.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#1.Keep Profane Language to a Minimum.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#2.No Spamming or Adverts.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#3.No intentional spawnkilling.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#4.Do not bother people who do not want to be bothered.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#5.Please report anything you see via /report [id] (reason) or use the forums.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#6.Please check /help  & /help2 before approaching an admin for help.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#7.Don't ask anyone for admin or money, PERIOD!!");
    SendClientMessage(playerid, 0xFFFFFFFF, "#8.Do not hack, cheat, or use third party mods that affect multiplayer gameplay.");
    SendClientMessage(playerid, 0xFFFFFFFF, "#9.Please respect all admins and PCRP Members and what they ask of you.");
    return 1;
}
Reply
#3

1- Your indentation is fucked.
2- Use zcmd as Swizzyy Gave it you.
3- Try to don't have another FS that uses the same anims codes.
4- Compile with 0.3c and download new includes.
Reply
#4

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
1- Your indentation is fucked.
2- Use zcmd as Swizzyy Gave it you.
3- Try to don't have another FS that uses the same anims codes.
4- Compile with 0.3c and download new includes.
1- as stated my indentation is fine its the way it copied and paste
2- cheers
3- ok thanks
4- already do
Reply
#5

if you included ZCMD than OnPlayerCommandText is not called
Reply
#6

yeah i see that now thanks heaps guys much appreciated i converted everything over and all is working great

ps.Swizzzy i gave you +rep thanks for your help
Reply
#7

Quote:
Originally Posted by Lookin
Посмотреть сообщение
yeah i see that now thanks heaps guys much appreciated i converted everything over and all is working great

ps.Swizzzy i gave you +rep thanks for your help
Glad to help.
Reply
#8

cheers
Reply
#9

Don't you need to clear the animation first before starting a new one?
Reply
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if (strcmp("/pee", cmdtext, true, 4) == 0)
    {
        SetPlayerSpecialAction(playerid, 68);
        return 1;
    }

    if (strcmp("/Smoke", cmdtext, true, 6) ==0)
    {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        SendClientMessage(playerid, 0xFFFF00AA, "To smoke, use the left mouse buttom.");
        return 1;
    }

    if (strcmp("/handsup", cmdtext, true, 8) ==0)
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
        SendClientMessage(playerid, 0xFFFF00AA, "Presh enter to stop the annim");
        return 1;
    }

        if (strcmp("/drink", cmdtext, true, 6) ==0)
    {
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
        SendClientMessage(playerid, 0xFFFF00AA, "To Drink, use the left mouse buttom");
        return 1;
    }

    if (strcmp("/dance", cmdtext, true, 6) ==0)
    {
        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
        return 1;
    }

    if (strcmp("/anims", cmdtext, true, 6) ==0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, ".::Anims List::.");
        SendClientMessage(playerid, 0xFFFFFFFF, "/pee, /smoke, /handsup, /drink, /dance");
        return 1;
    }

    if (strcmp("/rules", cmdtext, true, 6) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, ".::Rules::.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#1.Keep Profane Language to a Minimum.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#2.No Spamming or Adverts.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#3.No intentional spawnkilling.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#4.Do not bother people who do not want to be bothered.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#5.Please report anything you see via /report [id] (reason) or use the forums.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#6.Please check /help  & /help2 before approaching an admin for help.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#7.Don't ask anyone for admin or money, PERIOD!!");
        SendClientMessage(playerid, 0xFFFFFFFF, "#8.Do not hack, cheat, or use third party mods that affect multiplayer gameplay.");
        SendClientMessage(playerid, 0xFFFFFFFF, "#9.Please respect all admins and PCRP Members and what they ask of you.");
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)