SA-MP Forums Archive
Player Infomation!!! - 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: Player Infomation!!! (/showthread.php?tid=446073)



Player Infomation!!! - xganyx - 24.06.2013

How do i create player infomation like :
Код:
enum pInfo
{
      pAdmin,
      pVip,
      pCash,
      pKill,
      pDeath,
}



Re: Player Infomation!!! - ReVo_ - 24.06.2013

new PlayerInfo[MAX_PLAYERS][pInfo];

then

PlayerInfo [ playerid ][ pAdmin (or pVip etc.) ] = value_you_want;


Re: Player Infomation!!! - dEcooR - 24.06.2013

Код:
enum pInfo
{
      pAdmin,
      pVip,
      pCash,
      pKill,
      pDeath
}
new PlayerInfo[MAX_PLAYERS][pInfo];



Re: Player Infomation!!! - xganyx - 24.06.2013

like this:
Код:
CMD:sethp(playerid, params[])
{
    new string[128], playa, health;
    if(sscanf(params, "ud", playa, health))
	{
        SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /sethp [playerid] [health]");
        return 1;
    }
    if (PlayerInfo[playerid][pAdmin] >= 4) {
        if(IsPlayerConnected(playa)) {
            if(playa != INVALID_PLAYER_ID)
			{
                SetPlayerHealth(playa, health);
                format(string, sizeof(string), "You have set %s's health to %d.", GetPlayerName(playa), health);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
        }
        else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
    }
    else {
        SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
But I Have Error:
Код:
C:\Users\Admin\Desktop\Example\gamemodes\Gany.pwn(1518) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\Example\gamemodes\Gany.pwn(1518) : warning 202: number of arguments does not match definition



Re: Player Infomation!!! - xganyx - 24.06.2013

hey how i can make the login and register with player info