just small code/fix
#1

!-Solved-!

Note : the problem with /aSLAP cmd not /aduty
Код:
[09:46:06] ServerOwner says: hello samp forums [09:46:09] ServerOwner says: i wanna know what wrong with this commands please [09:46:17] USAGE: /aslap [player] [09:46:25] ServerOwner says: *** iam off duty now *** [09:46:26] You have clocked out from Admin Duty, you are now in Role Play Mode. [09:46:33] You can't do this whilst your off Duty! [09:47:02] ServerOwner says: still working and getting you are off duty why ? [09:47:20] ServerOwner says: thanks for reading the post
Image :


Code :
aSLAP CMD
pawn Код:
CMD:aslap(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >=2)
    {
        if(PlayerInfo[playerid][pAdmin] >= 2 && PlayerInfo[playerid][pAdminDuty] != 1)
        {
            SendClientMessageEx(playerid, COLOR_GRAD2, "You can't do this whilst your off Duty!");
        }
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /aslap [player]");

        new Float:shealth;
        new Float:slx, Float:sly, Float:slz;

        if(IsPlayerConnected(giveplayerid))
        {

            GetPlayerHealth(giveplayerid, shealth);
            SetPlayerHealth(giveplayerid, shealth-5);
            GetPlayerPos(giveplayerid, slx, sly, slz);
            SetPlayerPos(giveplayerid, slx, sly, slz+5);
            PlayerPlaySound(giveplayerid, 1130, slx, sly, slz+5);
            format(string, sizeof(string), "AdmCmd: %s was slapped by %s",GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid));
            ABroadCast(COLOR_LIGHTRED,string,2);

        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
    }
    return 1;
}
aDUTY CMD
pawn Код:
CMD:aduty(playerid, params[]) {
    new string[128];
    if((PlayerInfo[playerid][pAdmin] >= 2) && GetPVarInt(playerid, "IsInArena") < 0 && !GetPVarInt(playerid, "EventToken")) {
        if(PlayerInfo[playerid][pAdminDuty]) {
            PlayerInfo[playerid][pAdminDuty] = 0;
            PlayerInfo[playerid][pTogReports] = 1;
            //SetPlayerToTeamColor(playerid);
            SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked out from Admin Duty, you are now in Role Play Mode.");
            format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked off and is now off duty.", GetPlayerNameEx(playerid));
            ABroadCast(COLOR_YELLOW,string, 2);
        }
        else {
            PlayerInfo[playerid][pAdminDuty] = 1;
            PlayerInfo[playerid][pTogReports] = 0;
            //SetPlayerToTeamColor(playerid);
            SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked in to Admin Duty, you are no longer in Role play Mode.");
            format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked in and is now on duty.", GetPlayerNameEx(playerid));
            ABroadCast(COLOR_YELLOW,string, 2);
        }
    }
    return 1;
}
Reply


Messages In This Thread
!-Solved-! !-Thanks-! - by Joe_Goro - 17.11.2013, 06:51
Re: just small code/fix - by Pottus - 17.11.2013, 06:57
Re: just small code/fix - by Joe_Goro - 17.11.2013, 07:01
Re: just small code/fix - by Pottus - 17.11.2013, 07:02
Re: just small code/fix - by Joe_Goro - 17.11.2013, 07:06
Solved - Working - by Joe_Goro - 17.11.2013, 07:20

Forum Jump:


Users browsing this thread: 1 Guest(s)