02.05.2013, 19:35
(
Последний раз редактировалось kalanerik99; 03.05.2013 в 06:22.
)
Hi
Can someone make that it will save if player is VIP or not into a %s.ini folder
Code:
Can someone make that it will save if player is VIP or not into a %s.ini folder
Code:
PHP код:
#include <a_samp>
#define color 0x33AA33AA
#include <zcmd>
enum PlayerInfo
{
IsPlayerVIP
};
new pInfo[MAX_PLAYERS][PlayerInfo];
CMD:setvip(playerid, params[])
{
if(pInfo[playerid][IsPlayerVIP] == 0)
{
new ID = strval(params);
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
new string[128];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,color,"You are not an RCON admin!");
if (!strlen(params)) return SendClientMessage(playerid, -1, "{FF0000}Usage: /setvip [PlayerID]");
else if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}That player isn't connected.");
else
{
format(string, sizeof(string), "Staff member %s has set %s to a VIP.", PlayerName,ID);
SendClientMessageToAll(-1, string);
pInfo[playerid][IsPlayerVIP] = 1;
}
}
else
{
pInfo[playerid][IsPlayerVIP] = 0;
}
return 1;
}