SA-MP Forums Archive
Can someone fix this for me.. - 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: Can someone fix this for me.. (/showthread.php?tid=279392)



Can someone fix this for me.. - Amel_PAtomAXx - 26.08.2011

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 :/


Re: Can someone fix this for me.. - FireCat - 26.08.2011

Show me strrest


Re: Can someone fix this for me.. - Amel_PAtomAXx - 26.08.2011

FIXED