Posts: 195
Threads: 19
Joined: Apr 2011
Quote:
Originally Posted by Kush
You've done nothing but strip this out of a Godfather edit.
PHP код:
new faction[MAX_PLAYERS];
YCMD:makeleader(playerid, params[], help)
{
#pragma unused help
if(IsPlayerAdmin(playerid))
{
new id, fnumber;
if(sscanf(params, "ui", id, fnumber)) return SendClientMessage(playerid, -1, "USAGE: /makeleader [playerid] [faction]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player is not connected!");
faction[id] = fnumber;
new string[128];
format(string, sizeof(string), "You have been made leader of faction number %d.", fnumber);
SendClientMessage(id, -1, string);
}
else
{
SendClientMessage(playerid, -1, "You are not authorized to use that command!");
}
return 1;
}
An example done in YCMD. Untested.
|
Actually i took this from my scratch server
, i don't use a Godfather edit