SA-MP Forums Archive
fix system - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: fix system (/showthread.php?tid=198761)



fix system - s0Lic - 13.12.2010

hello guys,
i have problem with fix system..can someone help me? it doesn't worked

fix system only use by admin/mod only with commands /fix [player id] , when player stuck,weapon bugs or anything else,they may ask an admin/mod to fix them .. when admin/mod use /fix [player id] they will spawn back and dont have any bug .. can someone help me? it doesnt work in my server


Re: fix system - Toreno - 13.12.2010

Try this one,
mhm... what I just made for you... it's kinda for RP mode,
if you are not using an RP mode, change the values then:
pLoggedIn...
PlayerInfo[playerid][pAdmin]
pawn Код:
if(strcmp(cmd, "/fix", true) == 0)
{
    new targetid;
    targetid = ReturnUser(tmp);
    if(pLoggedIn[playerid] == 0) { return SendClientMessage(playerid, COLOR_LIGHTRED, "You must log in first!"); }
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        if(IsPlayerConnected(targetid))
        {
            if(targetid != INVALID_PLAYER_ID)
            {
                new targetid[MAX_PLAYER_NAME], playeridname[MAX_PLAYER_NAME];
                GetPlayerName(targetid, targetidname, sizeof(targetidname));
                GetPlayerName(playerid, playeridname, sizeof(playeridname));
                SpawnPlayer(targetid);
                SendClientMessage(playerid, COLOR_WHITE, "You have just fixed %s",targetidname);
                SendClientMessage(targetid, COLOR_WHITE, "You have been fixed by admin %s",playeridname);
            }
        }
    } else { return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an admin!"); }
    return 1;
}
Hope it works :]


Re: fix system - s0Lic - 13.12.2010

yea its work ,thank you very much dude