All pastes #829744 Raw Edit

Miscellany

public text v1 · immutable
#829744 ·published 2007-12-23 13:02 UTC
rendered paste body
new trackarr[MAX_PLAYERS];
new i[MAX_PLAYERS];

forward Loadtrack(i);


if (strcmp("/track1", cmdtext, true, 7) == 0)
	{
		SendClientMessage(playerid,YELLOW,"Loading Track 1...Please wait");
		trackarr[playerid]=1;
		CallRemoteFunction("Loadtrack",i,playerid);
		return 1;
	}
	
	if (strcmp("/track2", cmdtext, true, 7) == 0)
	{
        SendClientMessage(playerid,YELLOW,"Loading Track 2...Please wait");
        trackarr[playerid]=2;
		CallRemoteFunction("Loadtrack",i,playerid);
		return 1;
	}

public Loadtrack(i)
{
    if(trackarr[i] == 1)
    {
    SendClientMessage(i,YELLOW,"Gets to track1");
    }
    
    if(trackarr[i] == 2)
    {
    SendClientMessage(i,YELLOW,"Gets to track2");
    }
    return 1;
}