strtok problem
#1

How to fix this error?
pawn Код:
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(84) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(84) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(178) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(178) : error 033: array must be indexed (variable "tmp")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

You have strtok function?
Reply
#3

Show me the code, and do you have the function ?
Reply
#4

This is the code , plz fix it fast
pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/animhelp", true)==0)
    {
             SendClientMessage(playerid,0x00FFFFAA,"|------Animations------|");
             SendClientMessage(playerid,0x00FFFFAA,"/ciggy,/smoke,/drunk,/bomb,/getarrested");
             SendClientMessage(playerid,0x00FFFFAA,"/laugh,/lookout,/robman,/crossarms,/handsup");
             SendClientMessage(playerid,0x00FFFFAA,"/cellin,/cellout,/piss,/beer,/wine,/sprunk");
             SendClientMessage(playerid,0x00FFFFAA,"/deal,/crack,/smokef,/smokem,/groundsit,/chat,");
             SendClientMessage(playerid,0x00FFFFAA,"/fucku,/taichi,/chairsit,/lay,/hide,/jump,/aim");
             SendClientMessage(playerid,0x00FFFFAA,"/animcar,/animbar,/animairport,/vomit,/basket");
             SendClientMessage(playerid,0x00FFFFAA,"/eat,/wave,slapass,/dance [style 1-4],/kiss [style 1-6]");
             SendClientMessage(playerid,0x00FFFFAA,"/saim,/rap,/sup,/strip,/lean,/walk,/greload,/aim");
             return 1;
    }
    if(strcmp(cmdtext, "/ciggy", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To smoke, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/drunk", true) == 0) {
          ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
          return 1;}
    if (strcmp("/bomb", cmdtext, true) == 0) {
          ClearAnimations(playerid);
          ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/laugh", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/getarrested", cmdtext, true, 7) == 0) {
          ApplyAnimation(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1);
          return 1;}
    if (strcmp("/lookout", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/robman", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/crossarms", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
          return 1;}
    if(strcmp(cmdtext, "/handsup", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
          return 1;}
    if(strcmp(cmdtext, "/cellin", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/kiss", true) == 0) {
          new tmp[256];
          new D_STYLE;
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp) || strlen(tmp) > 2) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /kiss [style 1-6]");
          return 1;}
          D_STYLE = strval(tmp);
          if(D_STYLE < 1 || D_STYLE > 6) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /kiss [style 1-6]");
          return 1;}
          if(D_STYLE == 1) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_02", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 2) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_01", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 3) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_03", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 4) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_01", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 5) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_02", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 6) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_03", 3.0, 0, 0, 0, 0, 0);
          }
          return 1;}
    if(strcmp(cmdtext, "/cellout", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/cellout", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/piss", true) == 0) {
          SetPlayerSpecialAction(playerid, 68);
          return 1;}

    if(strcmp(cmdtext, "/beer", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/wine", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/sprunk", true) == 0)   {
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if (strcmp("/deal", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/crack", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/smokem", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/smokef", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/groundsit", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if(strcmp(cmdtext, "/chat", true) == 0) {
          ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
          return 1;}
    if(strcmp(cmdtext, "/fucku", true) == 0) {
          ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
          return 1;}
    if(strcmp(cmdtext, "/taichi", true) == 0) {
          ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
          return 1; }
    if(strcmp(cmdtext, "/chairsit", true) == 0) {
          ApplyAnimation(playerid,"BAR","dnk_stndF_loop",4.0,1,0,0,0,0);
          return 1;}
    if (strcmp("/lay", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/hide", cmdtext, true, 3) == 0) {
          ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/vomit", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/eat", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/wave", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/slapass", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
          return 1;
          }

    if(strcmp(cmdtext, "/dance", true) == 0) {
          new tmp[256];
          new D_STYLE;
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp) || strlen(tmp) > 2) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          D_STYLE = strval(tmp);
          if(D_STYLE < 1 || D_STYLE > 4) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          if(D_STYLE == 1) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
          } else if(D_STYLE == 2) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
          } else if(D_STYLE == 3) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
          } else if(D_STYLE == 4) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
          }
          return 1;}
    if(strcmp(cmdtext, "/sanim", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
        switch (cmdtext[7])
        {
            case '1': ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); // male
            case '2': ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); //female
            case '3': ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); // standing-fucked
            case '4': ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); // standing
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/sup", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
            case '2': ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
            case '3': ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/rap", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"RAPPING","RAP_A_Loop",4.0,1,0,0,0,0);
            case '2': ApplyAnimation(playerid,"RAPPING","RAP_C_Loop",4.0,1,0,0,0,0);
            case '3': ApplyAnimation(playerid,"GANGS","prtial_gngtlkD",4.0,1,0,0,0,0);
            case '4': ApplyAnimation(playerid,"GANGS","prtial_gngtlkH",4.0,1,0,0,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/strip", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
        switch (cmdtext[7])
        {
            case 'a', 'A': ApplyAnimation(playerid,"STRIP", "strip_A", 4.1, 1, 1, 1, 1, 1 );
            case 'b', 'B': ApplyAnimation(playerid,"STRIP", "strip_B", 4.1, 1, 1, 1, 1, 1 );
            case 'c', 'C': ApplyAnimation(playerid,"STRIP", "strip_C", 4.1, 1, 1, 1, 1, 1 );
            case 'd', 'D': ApplyAnimation(playerid,"STRIP", "strip_D", 4.1, 1, 1, 1, 1, 1 );
            case 'e', 'E': ApplyAnimation(playerid,"STRIP", "strip_E", 4.1, 1, 1, 1, 1, 1 );
            case 'f', 'F': ApplyAnimation(playerid,"STRIP", "strip_F", 4.1, 1, 1, 1, 1, 1 );
            case 'g', 'G': ApplyAnimation(playerid,"STRIP", "strip_G", 4.1, 1, 1, 1, 1, 1 );
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/lean", true) == 0)
    {
        if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
        switch (cmdtext[6])
        {
            case '1': ApplyAnimation(playerid,"GANGS","leanIDLE",4.0,0,1,1,1,0);
            case '2': ApplyAnimation(playerid,"MISC","Plyrlean_loop",4.0,0,1,1,1,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/walk", true) == 0)
    {
        if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
        new style = strval(cmdtext[6]);
        if (style == 1)
        {
            ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
        }
        else if (style == 2)
        {
            ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
        }
        else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
        return 1;
    }
    if(strcmp(cmdtext, "/greload", true) == 0)
    {
        if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /greload [deagle/smg/ak/m4]");
        if (strcmp("deagle",cmdtext[8],true) == 0)
        {
            ApplyAnimation(playerid,"COLT45","colt45_reload",4.0,0,0,0,0,1);
        }
        else if (strcmp("smg",cmdtext[8],true) == 0 || strcmp("ak",cmdtext[8],true) == 0 || strcmp("m4",cmdtext[8],true) == 0)
        {
            ApplyAnimation(playerid,"UZI","UZI_reload",4.0,0,0,0,0,0);
        }
        else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /greload [deagle/smg/ak/m4]");
        return 1;
    }

    if(strcmp(cmdtext, "/aim", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-3]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"PED","gang_gunstand",4.0,1,1,1,1,1);
            case '2': ApplyAnimation(playerid,"PED","Driveby_L",4.0,0,1,1,1,1);
            case '3': ApplyAnimation(playerid,"PED","Driveby_R",4.0,0,1,1,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-3]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/basket", true) == 0)
    {
        if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
        switch (cmdtext[8])
        {
            case '1': ApplyAnimation(playerid,"BSKTBALL","BBALL_idleloop",4.0,1,0,0,0,0);
            case '2': ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
            case '3': ApplyAnimation(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);
            case '4': ApplyAnimation(playerid,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);
            case '5': ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
            case '6': ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/knife", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
        switch (cmdtext[7])
        {
            case '1': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,0,1,1,1,0);
            case '2': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",4.0,0,1,1,1,0);
            case '3': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Player",4.0,0,0,0,0,0);
            case '4': ApplyAnimation(playerid,"KNIFE","KILL_Partial",4.0,0,1,1,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/animairport", true))
    {
        if(IsPlayerInAnyVehicle(playerid) == 1) return SendClientMessage(playerid,0xFFFF00AA," Animations are inaccessible in transport!");

        ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
        return 1;
    }
    if(!strcmp(cmdtext, "/animcar", true))
    {
         ApplyAnimation(playerid,"CAR","Fixn_Car_Loop",4.1,0,1,1,1,1);
         return 1;
         }
    if(!strcmp(cmdtext, "/animbar", true))
    {
         ApplyAnimation(playerid,"BAR","Barcustom_get",4.1,0,1,1,1,1);
         return 1;
         }
    if(!strcmp(cmdtext, "/jump", true))
    {
        ApplyAnimation(playerid,"DAM_JUMP","DAM_LAUNCH",2,0,1,1,0,0);
        return 1;
        }

    return 0;
}
Reply
#5

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/animhelp", true)==0)
    {
             SendClientMessage(playerid,0x00FFFFAA,"|------Animations------|");
             SendClientMessage(playerid,0x00FFFFAA,"/ciggy,/smoke,/drunk,/bomb,/getarrested");
             SendClientMessage(playerid,0x00FFFFAA,"/laugh,/lookout,/robman,/crossarms,/handsup");
             SendClientMessage(playerid,0x00FFFFAA,"/cellin,/cellout,/piss,/beer,/wine,/sprunk");
             SendClientMessage(playerid,0x00FFFFAA,"/deal,/crack,/smokef,/smokem,/groundsit,/chat,");
             SendClientMessage(playerid,0x00FFFFAA,"/fucku,/taichi,/chairsit,/lay,/hide,/jump,/aim");
             SendClientMessage(playerid,0x00FFFFAA,"/animcar,/animbar,/animairport,/vomit,/basket");
             SendClientMessage(playerid,0x00FFFFAA,"/eat,/wave,slapass,/dance [style 1-4],/kiss [style 1-6]");
             SendClientMessage(playerid,0x00FFFFAA,"/saim,/rap,/sup,/strip,/lean,/walk,/greload,/aim");
             return 1;
    }
    if(strcmp(cmdtext, "/ciggy", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To smoke, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/drunk", true) == 0) {
          ApplyAnimation(playerid,"PED","WALK_DRUNK",4.0,1,1,1,1,0);
          return 1;}
    if (strcmp("/bomb", cmdtext, true) == 0) {
          ClearAnimations(playerid);
          ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/laugh", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/getarrested", cmdtext, true, 7) == 0) {
          ApplyAnimation(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1);
          return 1;}
    if (strcmp("/lookout", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/robman", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/crossarms", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1);
          return 1;}
    if(strcmp(cmdtext, "/handsup", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
          return 1;}
    if(strcmp(cmdtext, "/cellin", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/kiss", true) == 0) {
          new tmp[256];
          new D_STYLE;
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp) || strlen(tmp) > 2) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /kiss [style 1-6]");
          return 1;}
          D_STYLE = strval(tmp);
          if(D_STYLE < 1 || D_STYLE > 6) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /kiss [style 1-6]");
          return 1;}
          if(D_STYLE == 1) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_02", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 2) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_01", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 3) {
          ApplyAnimation(playerid, "KISSING", "Playa_Kiss_03", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 4) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_01", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 5) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_02", 3.0, 0, 0, 0, 0, 0);
          } else if(D_STYLE == 6) {
          ApplyAnimation(playerid, "KISSING", "Grlfrd_Kiss_03", 3.0, 0, 0, 0, 0, 0);
          }
          return 1;}
    if(strcmp(cmdtext, "/cellout", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/cellout", true) == 0) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
          return 1;}
    if(strcmp(cmdtext, "/piss", true) == 0) {
          SetPlayerSpecialAction(playerid, 68);
          return 1;}

    if(strcmp(cmdtext, "/beer", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/wine", true) == 0){
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if(strcmp(cmdtext, "/sprunk", true) == 0)   {
          SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
          SendClientMessage(playerid, 0xFFFF00AA, "Stop: To drink, use the FIRE KEY.");
          return 1;}
    if (strcmp("/deal", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/crack", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/smokem", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/smokef", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/groundsit", cmdtext, true, 4) == 0) {
          ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if(strcmp(cmdtext, "/chat", true) == 0) {
          ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
          return 1;}
    if(strcmp(cmdtext, "/fucku", true) == 0) {
          ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
          return 1;}
    if(strcmp(cmdtext, "/taichi", true) == 0) {
          ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
          return 1; }
    if(strcmp(cmdtext, "/chairsit", true) == 0) {
          ApplyAnimation(playerid,"BAR","dnk_stndF_loop",4.0,1,0,0,0,0);
          return 1;}
    if (strcmp("/lay", cmdtext, true, 6) == 0) {
          ApplyAnimation(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/hide", cmdtext, true, 3) == 0) {
          ApplyAnimation(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/vomit", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/eat", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/wave", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "ON_LOOKERS", "wave_loop", 4.0, 1, 0, 0, 0, 0);
          return 1;}
    if (strcmp("/slapass", cmdtext, true) == 0) {
          ApplyAnimation(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0);
          return 1;
          }

    if(strcmp(cmdtext, "/dance", true) == 0) {
          new tmp[256];
          new D_STYLE;
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp) || strlen(tmp) > 2) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          D_STYLE = strval(tmp);
          if(D_STYLE < 1 || D_STYLE > 4) {
          SendClientMessage(playerid,0xFF0000FF,"USAGE: /dance [style 1-4]");
          return 1;}
          if(D_STYLE == 1) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
          } else if(D_STYLE == 2) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
          } else if(D_STYLE == 3) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
          } else if(D_STYLE == 4) {
          SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
          }
          return 1;}
    if(strcmp(cmdtext, "/sanim", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
        switch (cmdtext[7])
        {
            case '1': ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0); // male
            case '2': ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0); //female
            case '3': ApplyAnimation(playerid,"SMOKING","M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0); // standing-fucked
            case '4': ApplyAnimation(playerid,"SMOKING","M_smk_out", 4.0, 1, 0, 0, 0, 0); // standing
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /smoke [1-4]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/sup", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
            case '2': ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
            case '3': ApplyAnimation(playerid,"GANGS","hndshkfa_swt",4.0,0,0,0,0,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /sup [1-3]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/rap", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"RAPPING","RAP_A_Loop",4.0,1,0,0,0,0);
            case '2': ApplyAnimation(playerid,"RAPPING","RAP_C_Loop",4.0,1,0,0,0,0);
            case '3': ApplyAnimation(playerid,"GANGS","prtial_gngtlkD",4.0,1,0,0,0,0);
            case '4': ApplyAnimation(playerid,"GANGS","prtial_gngtlkH",4.0,1,0,0,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /rap [1-4]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/strip", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
        switch (cmdtext[7])
        {
            case 'a', 'A': ApplyAnimation(playerid,"STRIP", "strip_A", 4.1, 1, 1, 1, 1, 1 );
            case 'b', 'B': ApplyAnimation(playerid,"STRIP", "strip_B", 4.1, 1, 1, 1, 1, 1 );
            case 'c', 'C': ApplyAnimation(playerid,"STRIP", "strip_C", 4.1, 1, 1, 1, 1, 1 );
            case 'd', 'D': ApplyAnimation(playerid,"STRIP", "strip_D", 4.1, 1, 1, 1, 1, 1 );
            case 'e', 'E': ApplyAnimation(playerid,"STRIP", "strip_E", 4.1, 1, 1, 1, 1, 1 );
            case 'f', 'F': ApplyAnimation(playerid,"STRIP", "strip_F", 4.1, 1, 1, 1, 1, 1 );
            case 'g', 'G': ApplyAnimation(playerid,"STRIP", "strip_G", 4.1, 1, 1, 1, 1, 1 );
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /strip [A-G]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/lean", true) == 0)
    {
        if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
        switch (cmdtext[6])
        {
            case '1': ApplyAnimation(playerid,"GANGS","leanIDLE",4.0,0,1,1,1,0);
            case '2': ApplyAnimation(playerid,"MISC","Plyrlean_loop",4.0,0,1,1,1,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /lean [1-2]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/walk", true) == 0)
    {
        if (!strlen(cmdtext[6])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
        new style = strval(cmdtext[6]);
        if (style == 1)
        {
            ApplyAnimation(playerid,"PED","WALK_gang1",4.1,1,1,1,1,1);
        }
        else if (style == 2)
        {
            ApplyAnimation(playerid,"PED","WALK_gang2",4.1,1,1,1,1,1);
        }
        else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /walk [1/2]");
        return 1;
    }
    if(strcmp(cmdtext, "/greload", true) == 0)
    {
        if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /greload [deagle/smg/ak/m4]");
        if (strcmp("deagle",cmdtext[8],true) == 0)
        {
            ApplyAnimation(playerid,"COLT45","colt45_reload",4.0,0,0,0,0,1);
        }
        else if (strcmp("smg",cmdtext[8],true) == 0 || strcmp("ak",cmdtext[8],true) == 0 || strcmp("m4",cmdtext[8],true) == 0)
        {
            ApplyAnimation(playerid,"UZI","UZI_reload",4.0,0,0,0,0,0);
        }
        else SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /greload [deagle/smg/ak/m4]");
        return 1;
    }

    if(strcmp(cmdtext, "/aim", true) == 0)
    {
        if (!strlen(cmdtext[5])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-3]");
        switch (cmdtext[5])
        {
            case '1': ApplyAnimation(playerid,"PED","gang_gunstand",4.0,1,1,1,1,1);
            case '2': ApplyAnimation(playerid,"PED","Driveby_L",4.0,0,1,1,1,1);
            case '3': ApplyAnimation(playerid,"PED","Driveby_R",4.0,0,1,1,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /aim [1-3]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/basket", true) == 0)
    {
        if (!strlen(cmdtext[8])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
        switch (cmdtext[8])
        {
            case '1': ApplyAnimation(playerid,"BSKTBALL","BBALL_idleloop",4.0,1,0,0,0,0);
            case '2': ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);
            case '3': ApplyAnimation(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);
            case '4': ApplyAnimation(playerid,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);
            case '5': ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);
            case '6': ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /basket [1-6]");
        }
        return 1;
    }
    if(strcmp(cmdtext, "/knife", true) == 0)
    {
        if (!strlen(cmdtext[7])) return SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
        switch (cmdtext[7])
        {
            case '1': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Damage",4.0,0,1,1,1,0);
            case '2': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",4.0,0,1,1,1,0);
            case '3': ApplyAnimation(playerid,"KNIFE","KILL_Knife_Player",4.0,0,0,0,0,0);
            case '4': ApplyAnimation(playerid,"KNIFE","KILL_Partial",4.0,0,1,1,1,1);
            default: SendClientMessage(playerid,0xEFEFF7AA,"USAGE: /knife [1-4]");
        }
        return 1;
    }
    if(!strcmp(cmdtext, "/animairport", true))
    {
        if(IsPlayerInAnyVehicle(playerid) == 1) return SendClientMessage(playerid,0xFFFF00AA," Animations are inaccessible in transport!");

        ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
        return 1;
    }
    if(!strcmp(cmdtext, "/animcar", true))
    {
         ApplyAnimation(playerid,"CAR","Fixn_Car_Loop",4.1,0,1,1,1,1);
         return 1;
         }
    if(!strcmp(cmdtext, "/animbar", true))
    {
         ApplyAnimation(playerid,"BAR","Barcustom_get",4.1,0,1,1,1,1);
         return 1;
         }
    if(!strcmp(cmdtext, "/jump", true))
    {
        ApplyAnimation(playerid,"DAM_JUMP","DAM_LAUNCH",2,0,1,1,0,0);
        return 1;
        }

    return 0;
}
strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
 
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply
#6

pawn Код:
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(80) : error 017: undefined symbol "idx"
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\Anims.pwn(174) : error 017: undefined symbol "idx"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#7

But it isnt working..
Reply
#8

Yes i did but its not working and working for you?
Reply
#9

Yes it is compiling but not working..
Reply
#10

Leave it, thx for the help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)