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;
}
enum pGangInfo
{
Name[60],
Leader[24],
Banned
};
new GangInfo[MAX_PLAYERS][pGangInfo];
new GangID = -1;
dcmd_gangcreate(playerid, params[])
{
new string[128],n[MAX_PLAYER_NAME];
GetPlayerName(playerid,n,sizeof(n));
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /gangcreate <Name>");
GangID ++;
GangInfo[playerid][Leader] = n;
GangInfo[playerid][Name] = params;
format(string,sizeof(string),"%s has just created the gang %s(ID %d)",n,params,GangID);
SendClientMessageToAll(ORANGE,string);
return 1;
}
dcmd_gangcreate(playerid, params[])
{
new string[ 128 ], n[MAX_PLAYER_NAME];
GetPlayerName( playerid, n, sizeof( n ));
if( isnull( params ))
return SendClientMessage( playerid, GREY, "USAGE: /gangcreate <Name>" );
GangID ++;
GangInfo[playerid][Leader] = n;
GangInfo[playerid][Name] = params;
format( string, sizeof( string ), "%s has just created the gang %s(ID %d)", n, params, GangID );
SendClientMessageToAll( ORANGE, string );
return true;
}
GangInfo[playerid][Name] = params;
format( GangInfo[playerid][Name], sizeof( GangInfo[playerid][Name] ), "%s", params );
Ah, change to
pawn Код:
|
error 047: array sizes do not match, or destination array is too small expected token: "]", but found "-identifier-" warning 215: expression has no effect error 001: expected token: ";", error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
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] = params;
format( GangInfo[playerid][Name], sizeof( GangInfo[playerid][Name] ), "%s", params );
SendClientMessageToAll(ORANGE,string);
return 1;
}