29.01.2011, 13:18
Hey,I need someone to give me the script to make helpers,and all of this? and if I can know how to make a script that there I can make people a rank ? and if I can have the script of /new where u can ask questions
new helper[MAX_PLAYERS];
CMD:sethelper(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 0;
new giveplayerid;
if(sscanf(params, "u", giveplayerid))
return SendClientMessage(playerid, 0xAAAAAA, "Usage: /sethelper [ID]");
helper[giveplayerid] = 1;
new string[128];
new pName[24], aName[24];
GetPlayerName(playerid, aName, 24);
GetPlayerName(giveplayerid, pName, 24);
format(string, sizeof(string), "You have made %s a helper", pName);
SendClientMessage(playerid, 0xAAAAAA, string);
format(string, sizeof(string), "Administrator %s has made you a helper", aName);
SendClientMessage(giveplayerid, 0xAAAAAA, string);
return 1;
}
CMD:kick(playerid, params[])
{
if(helper[playerid] == 0)
return SendClientMessage(playerid, 0xAAAAAA, "You need to be helper to use this");
new giveplayerid;
if(sscanf(params, "u", giveplayerid))
return SendClientMessage(playerid, 0xAAAAAA, "Usage: /kick [ID]");
new string[128];
new pName[24], aName[24];
GetPlayerName(playerid, aName, 24);
GetPlayerName(giveplayerid, pName, 24);
format(string, sizeof(string), "Admin %s has kicked %s", aName, pName);
SendClientMessageToAll(0xAAAAAA, string);
Kick(giveplayerid);
return 1;
}
new rank[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(GetPlayerScore(playerid) > 300)
{
SendClientMessage(playerid, 0xAAAAAA, "Current rank: 2");
rank[playerid] = 2;
}
// Etc...
return 1;
}
CMD:kick(playerid, params[])
{
if(helper[playerid] == 0)
return SendClientMessage(playerid, 0xAAAAAA, "You need to be helper to use this");
new giveplayerid, reason;
if(sscanf(params, "us", giveplayerid, reason))
return SendClientMessage(playerid, 0xAAAAAA, "Usage: /kick [ID] [Reason]");
new string[128];
new pName[24], aName[24];
GetPlayerName(playerid, aName, 24);
GetPlayerName(giveplayerid, pName, 24);
format(string, sizeof(string), "Admin %s has kicked %s. Reason: %s", aName, pName, reason);
SendClientMessageToAll(0xAAAAAA, string);
Kick(giveplayerid);
return 1;
}
if(sscanf(params, "us", giveplayerid, reason))
return SendClientMessage(playerid, 0xAAAAAA, "Usage: /kick [ID] [Reason]");
if(sscanf(params, "ud", giveplayerid, reason))
return SendClientMessage(playerid, 0xAAAAAA, "Usage: /kick [ID] [Reason]");
format(string, sizeof(string), "Admin %s has kicked %s. Reason: %s", aName, pName, reason);
format(string, sizeof(string), "Admin %s has kicked %s. Reason: %d", aName, pName, reason);
CMD:kick(playerid, params[])
{
if(helper[playerid] == 0) return SendClientMessage(playerid, 0xAAAAAA, "You need to be helper to use this");
new giveplayerid, reason[20];
if(sscanf(params, "us[20]", giveplayerid, reason)) return SendClientMessage(playerid, 0xAAAAAA, "Usage: /kick [ID] [Reason]");
//If you want the reason to be optional, replace the "us[20]" above with "uS[20]"
new string[128];
new pName[24], aName[24];
GetPlayerName(playerid, aName, 24);
GetPlayerName(giveplayerid, pName, 24);
format(string, sizeof(string), "Admin %s has kicked %s. Reason: %s", aName, pName, reason);
//If you made the reason optional, replace the above line with this one:
//format(string, sizeof(string), "Admin %s has kicked %s. %s%s", aName, pName, reason[0] ? ("[Reason:]") : (" "), reason);
SendClientMessageToAll(0xAAAAAA, string);
Kick(giveplayerid);
return 1;
}