06.09.2010, 12:27
Im trying to create my own gang system but when i do /creategang it does everything correct except it doesnt show the name
Like the ID gets set properly but the name doesn't when i type /creategang Cool_Gang it will say I just created the gang (nothing) ID 1
how do i do this? also heres the enum i used to store the variables in:
pawn Код:
dcmd_gangcreate(playerid, params[])
{
new string[128],n[MAX_PLAYER_NAME],name;
GetPlayerName(playerid,n,sizeof(n));
name = strval(params);
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /gangcreate <Name>");
GangID ++;
GangInfo[playerid][Leader] = n;
GangInfo[playerid][Name] = name;
format(string,sizeof(string),"%s has just created the gang %s(ID %d)",n,name,GangID);
SendClientMessageToAll(ORANGE,string);
return 1;
}
how do i do this? also heres the enum i used to store the variables in:
pawn Код:
enum pGangInfo
{
Name[60],
Leader[24],
Banned
};
new GangInfo[MAX_PLAYERS][pGangInfo];
new GangID = -1;