dcmd_seths(playerid,params[])
{
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid))
{
new tmp [256];
new tmp2[256];
new Index;
tmp = strtok(params,Index);
tmp2 = strtok(params,Index);
if(!strlen(params))
{
new string[128];
format(string,sizeof(string),"Usage: /seths [PlayerID] [Horseshoe (0-%d)]", MAX_HORSESHOE);
SendClientMessage(playerid,LIGHTBLUE2,string);
return SendClientMessage(playerid, orange, "Function: Will set the horseshoe number of the Specific Player");
}
new player1, HorseShoe, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(!strlen(tmp2)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /seths [PlayerID] [Hroseshoe(0/30)]") &&
SendClientMessage(playerid, orange, "Function: Will set the horseshoe number of the Specific Player");
HorseShoe = strval(tmp2);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
if(AccInfo[player1][LoggedIn] == 1)
{
if(HorseShoe > MAX_HORSESHOE)
return SendClientMessage(playerid,red,"ERROR: Invalid number");
if(HorseShoe == AccInfo[player1][Horseshoe])
return SendClientMessage(playerid,red,"ERROR: Player already has thses hs");
SendCommandToAdmins(playerid,"SetHSl");
GetPlayerName(player1, playername, sizeof(playername));
GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day;
new hour,minute,second;
getdate(year, month, day);
gettime(hour,minute,second);
format(string,sizeof(string),"You have given %s Horseshoe %d on '%d/%d/%d' at '%d:%d:%d'", playername, HorseShoe, day, month, year, hour, minute, second);
SendClientMessage(playerid,yellow,string);
dUserSetINT(PlayerName2(player1)).("Horseshoe",(HorseShoe));
AccInfo[player1][Horseshoe] = HorseShoe;
return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
}
else return SendClientMessage(playerid,red,"ERROR: This player is not Registred or Logged!");
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}
else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
thank you
@ballu you can use it for a lot of stuff... like if a player find all 30 hs get a free vip account or score/cash u could use it for fun .... dunno like you want |