whats wrong with these commands?
#1

hello i have made these commands but they dont work can you pls take a look at it?
Код:
   	if (strcmp("/vommit", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "Amfg what did you eat?! that color isnt very nice!.");
	SendClientMessage(playerid, 0xFFFFFF, "A f*ck al that vommiting made you a little disorientadet");
	ApplyAnimation(playerid,"PED","EAT_Vomit_SK  ",4.1,1,1,1,1,1);
    SetPlayerHealth(playerid,90.0);
	SetPlayerDrunkLevel (playerid, 5000);

	return 1;
			}
   	if (strcmp("/pee", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "Omfg dont pee outside maybe there is a police in the neighberhood!.");
	ApplyAnimation(playerid,"PED","# Piss_in ",4.1,1,1,1,1,1);

	return 1;
			}
  	if (strcmp("/skate", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "YAY! lets skate!!!.");
	ApplyAnimation(playerid,"PED","# skate_run   ",4.1,1,1,1,1,1);
Reply
#2

Apart from much grammar errors I dont see much wrong thins
Reply
#3

well i type the commands but the anims just dont load
Reply
#4

https://sampwiki.blast.hk/wiki/ApplyAnimation -> Look at the 0.3b documentation and the force sync param
Reply
#5

ok sow now i got this:
Код:
   	if (strcmp("/vommit", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "Amfg what did you eat?! that color isnt very nice!.");
	SendClientMessage(playerid, 0xFFFFFF, "A f*ck al that vommiting made you a little disorientadet");
	ApplyAnimation(playerid,"FOOD","EAT_Vomit_SK  ",4.1,1,1,1,1,1);
    SetPlayerHealth(playerid,90.0);
	SetPlayerDrunkLevel (playerid, 5000);

	return 1;
			}
   	if (strcmp("/pee", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "Omfg dont pee outside maybe there is a police in the neighberhood!.");
	ApplyAnimation(playerid,"PAULNMAC","# Piss_in ",4.1,1,1,1,1,1);

	return 1;
			}
  	if (strcmp("/skate", cmdtext, true, 10) == 0)
	{
	SendClientMessage(playerid, 0xFFFFFF, "YAY! lets skate!!!.");
	ApplyAnimation(playerid,"SKATE","# skate_run   ",4.1,1,1,1,1,1);

	return 1;
			}
but that doesnt work either!
Reply
#6

With me I have to type the command 2 times in order for them to work, have you tried that?
Reply
#7

no that doesnt work either
Reply
#8

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
Apart from much grammar errors I dont see much wrong thins
*many wrong things.
Reply
#9

Actually took a look at your code, as I over-looked it the first time. I do suggest you look into DCMD, but for now, this will work.

This is how I learned to make commands from the wiki, so please do bear with me for a moment. If you'd like I could do it in DCMD for you.
pawn Код:
if(!strcmp(cmdtext, "/vommit", true, 7)) // The number 7 represents the length of the command
    {
        SendClientMessage(playerid, 0xFFFFFF, "Amfg what did you eat?! that color isnt very nice!.");
        SendClientMessage(playerid, 0xFFFFFF, "A f*ck al that vommiting made you a little disorientadet");
        ApplyAnimation(playerid,"FOOD","EAT_Vomit_SK  ",4.1,1,1,1,1,1);
        SetPlayerHealth(playerid,90.0);
        SetPlayerDrunkLevel (playerid, 5000);
        return 1;
    }
    if(!strcmp(cmdtext, "/pee", true, 4)) // The number 4 represents the length of the command
    {
        SendClientMessage(playerid, 0xFFFFFF, "Omfg dont pee outside maybe there is a police in the neighberhood!.");
        ApplyAnimation(playerid,"PAULNMAC","# Piss_in ",4.1,1,1,1,1,1);
        return 1;
    }
    if(!strcmp(cmdtext, "/skate", true, 6))  // The number 6 represents the length of the command
    {
        SendClientMessage(playerid, 0xFFFFFF, "YAY! lets skate!!!.");
        ApplyAnimation(playerid,"SKATE","# skate_run   ",4.1,1,1,1,1,1);
        return 1;
    }
Reply
#10

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
*many wrong things.
I believe its "Any"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)