Help. /Givemoney myself, player not online
#1

OK Fixed makeadmin.

NOW Help another thing.

I have scripted /Makeadmin and /givemoney cmd, but it says THAT PLAYER IS NOT CONNECTED when i want to do that on myself, it worked on myself, now it wont work
Reply
#2

Pawn Code please
Reply
#3

Show us your code mate.
Reply
#4

Code

pawn Код:
CMD:givemoney(playerid, params[])
{
    new targetid,type,string[128];
    if(sscanf(params, "ui", targetid, type)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}/givemoney [playerid] [amount]");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "* This player is not in server..");
    if(type < 0 || type > 99999999) return SendClientMessage(playerid, COLOR_GREY, "* Cannot go under 0 or above 99999999.");
    if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD1, "You are not ADMIN!");

    GivePlayerCash(targetid, type);
    format(string, sizeof(string),"AdmCmd: %s give player %s %d SAK", RPName( playerid ), RPName( targetid ), type);
    SendAdminMessage(COLOR_YELLOW,string);
    return 1;
}
Reply
#5

pawn Код:
CMD:givemoney(playerid, params[])
{
    new string[128], name[MAX_PLAYER_NAME], amount;
    if(sscanf(params, "s[24]d[10]", name, amount)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: {FFFFFF}/givemoney [Name] [amount]");
    /*if(doesAccountExist(name)) return SendClientMessage(playerid, COLOR_GREY, "* This player is not in server..");

    if you have doesAccountExist
   
    -----------------------------*/

    if(type < 0 || type > 99999999) return SendClientMessage(playerid, COLOR_GREY, "* Cannot go under 0 or above 99999999.");
    if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GRAD1, "You are not ADMIN!");

    format(string, sizeof(string), "Admin: %s was offline added money $%d by %s", name, amount, GetPlayerNameEx(playerid));
    SendClientMessageToAll(/*COLOR HERE*/,string);
    PlayerInfo[MAX_PLAYERS][pCash] += amount;
    /*OnPlayerOfflineSave(name);
   
    If you have OnPlayerOfflineSave
   
    ---------------------------*/

    return 1;
}
I think it involves the player registers, and much more
Quote:

I'm not sure with this cmd

Reply
#6

delete...sh*t spam
Reply
#7

how to delete this?
sh*t
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)