SA-MP Forums Archive
Unknown Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown Error (/showthread.php?tid=608819)



Unknown Error - CarRamper - 05.06.2016

Hello Guys Please Help Me I Have Error That When I Type /sit Command it says Unknown Error.Always Says Unknown Error.Here is my code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/sit", true) == 0)
    {
        ApplyAnimation(playerid,"PED","SEAT_IDLE",4,0,0,0, 1,0,1);
        return 1;
    }
    return 0;
    }



Re: Unknown Error - Eymeric69 - 05.06.2016

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
strcmp(cmdtext"/sit"true) == 0)
    {
        
ApplyAnimation(playerid,"PED","SEAT_idle",4,0,0,01,0,1);
        return 
1;
    }
    return 
0;

replace by that


Re: Unknown Error - CarRamper - 05.06.2016

Didn't Work


Re: Unknown Error - Dayrion - 05.06.2016

Quote:
Originally Posted by CarRamper
Посмотреть сообщение
Hello Guys Please Help Me I Have Error That When I Type /sit Command it says Unknown Error.Always Says Unknown Error.Here is my code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/sit", true) == 0)
    {
        ApplyAnimation(playerid,"PED","SEAT_IDLE",4,0,0,0, 1,0,1);
        return 1;
    }
    return 0;
}
This command is working. This is your only command?


Re: Unknown Error - CarRamper - 05.06.2016

This Command Is Not Working For Me


Re: Unknown Error - Eymeric69 - 05.06.2016

it is the only command on your script ?!


Re: Unknown Error - CarRamper - 05.06.2016

yes this the only command in my script under public OnPlayerCommandText please help me


Re: Unknown Error - oMa37 - 05.06.2016

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) 

    print(
"Called");
    if(
strcmp(cmdtext"/sit"true) == 0
    { 
        
ApplyAnimation(playerid,"PED","SEAT_idle",4,0,0,01,0,1); 
        print(
"Animation Applied");
        return 
1
    } 
    return 
0

Can you try this code and tell us does it print in the console?


Re: Unknown Error - Onfroi - 05.06.2016

Don't use another command processor and OnPlayerCommandText at the same time. Just stick to one.


Re: Unknown Error - CarRamper - 05.06.2016

Thanks