Quote:
Originally Posted by thetwistedpanda
Don't reset it. Magic! (It doesn't reset unless you tell it to reset somewhere.)
|
There is no resetting thats why im asking
Code:
new Handle:g_TestList = INVALID_HANDLE;
public OnPluginStart()
{
g_TestList = CreateArray(16);
RegConsoleCmd("sm_test", Command_Test, "sm_3");
}
public Action:Command_Test(client, args)
{
if (args < 1)
{
ReplyToCommand(client, "%s sm_test <nick>", g_sSvName);
return Plugin_Handled;
}
decl String:PlayerName[32];
decl String:Name[32];
GetCmdArg(1, PlayerName, sizeof(PlayerName));
PushArrayString(g_TestList, PlayerName);
new String:message[128];
for (new i = 0; i < GetArraySize(g_TestList); i++)
{
GetArrayString(g_TestList, i, message, sizeof(message));
PrintToAll(message);
}
return Plugin_Handled;
}
thats how the plugins looks like
when i input command sm_test a
it replys
a
when i input command sm_test b
it replys
a
b
when i input command sm_test c
it replys
a
b
c
after map change, when i input command sm_test d
it should reply
a
b
c
d
but it returns
d