30.05.2015, 18:53
PHP код:
COMMAND:gang(playerid, params[])
{
new i[7];
if (sscanf(params, "s[7]", i)) return SendClientMessage(playerid, COLOR_GREEN, "[GANG]:{FFFFFF} /gang create [GANG NAME]");
if (!strcmp(i, "create", true, 6))
{
if(sscanf(params, "s[128]", rest)) return SendClientMessage(playerid, COLOR_GREEN, "[GANG]:{FFFFFF} /gang create [GANG NAME]");
if(gang[playerid][gid] != -1) return SendClientMessage(playerid,COLOR_GREEN, "[GANG]:{FFFFFF}Leave your gang with /gangleave before creating a new one!");
if(IsgangTaken(rest)) return SendClientMessage(playerid, COLOR_GREEN, "[GANG]:{FFFFFF}gang name is already in use!");
Creategang(rest, playerid);
}
return 1;
}