Can someone fix this for me..
#1

pawn Код:
if (strcmp(cmd,"/fpk",true)== 0)
    {
        if(!strlen(cmdtext[4]))
        {
            scm(playerid, 0xFF0000FF, "Usage: /fpk [playerid] [FPK'er]");
            return 1;
        }
       
        new ID = strval(cmdtext[9]);
        new FPKer[256],str[128];
        FPKer = strrest(cmdtext,idx);
        new pName[MAX_PLAYER_NAME],vName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,sizeof(pName));
        GetPlayerName(ID,vName,sizeof(vName));
        if(!strlen(FPKer))
        {
            scm(playerid, 0xFF0000FF, "Usage: /fpk [playerid] [FPK'er]");
        }
        if(IsPlayerConnected(ID))
        {
            if(IsPlayerAdmin(playerid))
            {
       
                format(str,sizeof(str),"** %s was Faction PK'd by Admin %s, PKer: %s.",vName,pName,FPKer);
                scmToAll(COLOR_GREEN,str);
                pData[ID][pFaction] = 0;
            }
            else
            {
                scm(playerid,COLOR_RED,"You are not admin!");
            }
        }
        else
        {
            scm(playerid,COLOR_RED,"Player not connected!");
        }
        return 1;

    }
i didnt get errors , but when im type IG /fpk , my server crash :/
Reply
#2

Show me strrest
Reply
#3

FIXED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)