SA-MP Forums Archive
What mistake i am making here ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What mistake i am making here ? (/showthread.php?tid=621535)



What mistake i am making here ? - Stop - 12.11.2016

guys i am making cmd to check player gang that which gang the player belongs to ... so i made this cmd

CMD

Код:
COMMAND:showg(playerid, params[])
{
    new Player;
    if (sscanf(params, "u", Player)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /showg [PlayerID]");
    else if (Player == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
    else
    {
        new i = Player[playerid][PlayerGang];
        if(i != -1)
   	    new msg[256];
        format(msg, sizeof(msg), "{FFFFFF}Gang Name : {%s}%s {FFFFFF}", Gang[i][GangColor], Gang[i][GangName]);
        format(msg, sizeof(msg), "%s\nGang Tag : [%s]", msg, Gang[i][GangTag]);
        format(msg, sizeof(msg), "%s\nGang Score : %d", msg, Gang[i][GangScore]);
        ShowPlayerDialog(playerid, DIALOG_GCP, DIALOG_STYLE_LIST, "Player Information", msg, "Chooose", "Cancel");
			return 1;
	}
  
}
// if i am making wrng correct me plz


Re: What mistake i am making here ? - justice96 - 12.11.2016

Код:
new i = Player[Player][PlayerGang];