(1+ REP) Anti Command SPAM
#5

Quote:
Originally Posted by NewbieTester
Посмотреть сообщение
Use SetTimerEX
I Dont Know Where To Add Here:
PHP код:
CMD:sharexp(playerid,params[])
{
    if(
pInfo[playerid][pLogged] == 1)
    {
        if(
pInfo[playerid][pHour] >= 10)
        {
            new 
targetid,givexp,reason[105],stringxp[256];
            if(
sscanf(params,"uis[105]"targetid,givexp,reason)) return SendClientMessage(playerid,-1,""chat" /sharexp [playerid] [amount] [reason]");
            if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
            if(
targetid == playerid) return SendClientMessage(playerid,-1,""chat" You cannot give xp to yourself");
            if(
givexp 49 || givexp 5000) return SendClientMessage(playerid,-1,""chat"  You can only give xp between 50-5000");
            if (
givexp && pInfo[playerid][pXP] >= givexp)
            {
                
pInfo[targetid][pXP] += givexp;
                
pInfo[playerid][pXP] -= givexp;
                
format(stringxp,sizeof(stringxp),""chat" Player %s has shared %d xp to %s [Reason: %s]"PlayerName(playerid), givexpPlayerName(targetid), reason);
                
SendClientMessageToAll(-1,stringxp);
                
printf("Player %s has shared %d xp to %s [Reason: %s]"PlayerName(playerid), givexpPlayerName(targetid), reason);
            }
            else
            {
                
SendClientMessage(playerid,-1,""chat" You don't have enough XP");
            }
        }
        else 
SendClientMessage(playerid,-1,""chat" You need to play 10 hours before you can share xp!");
    }
    else if(
pInfo[playerid][pLogged] == 0)
    {
        
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" Nice try u fucking fag gay!");
        
printf("%s has been kicked for trying to use a command without being logged in!"PlayerName(playerid));
        
Kick(playerid);
    }
    return 
1;

Can You Do It For me?
Reply


Messages In This Thread
(1+ REP) Anti Command SPAM - by XGreen - 18.08.2014, 00:04
Re: (1+ REP) Anti Command SPAM - by XGreen - 18.08.2014, 00:23
Re: (1+ REP) Anti Command SPAM - by anou1 - 18.08.2014, 00:53
Re: (1+ REP) Anti Command SPAM - by NewbieTester - 18.08.2014, 01:43
Re: (1+ REP) Anti Command SPAM - by XGreen - 18.08.2014, 02:33
Re: (1+ REP) Anti Command SPAM - by XGreen - 18.08.2014, 02:39
Re: (1+ REP) Anti Command SPAM - by gtasarules14 - 18.08.2014, 03:11
Re: (1+ REP) Anti Command SPAM - by XGreen - 18.08.2014, 13:41
Re: (1+ REP) Anti Command SPAM - by Ada32 - 18.08.2014, 14:29
Re: (1+ REP) Anti Command SPAM - by Sarra - 18.08.2014, 15:29

Forum Jump:


Users browsing this thread: 2 Guest(s)