plzzz help me D:
#1

i have been trying to clour my team from long time saw lots of tut but its not helping me so i hope i can get help from here ...here are the codes its giving me no errors but tow warrnings ....its only colouring team grove skin like 1st skin will be green second will be purple 3rd blue and 4th lightblue as defined so i want my whole grove team to be green ...ballas purple cops blue and bikers lightblue plz help


Код:
// killer G_wars
// by- chinmay kawale
//#define FILTERSCRIPT

#include <a_samp>
//================team ids ===============//
#define TEAM_GROVE  0
#define TEAM_BALLAS 1
#define TEAM_COPS   2
#define TEAM_BIKERS 3

//=========colors===========================//
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_TAN 0xBDB76BAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_INVISWHITE 0xFFFFFF00
#define COLOR_DARKRED 0x660000AA


//=======TEAM COLORS=====================//
#define TEAM_GROVE_COLOUR 0x33AA33AA//green duh
#define TEAM_BALLAS_COLOUR 0x800080AA//purple duh
#define TEAM_COPS_COLOUR 0x0000BBAA//blue duh
#define TEAM_BIKERS_COLOUR 0x33CCFFAA//lightblue duh


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

new gTeam[MAX_PLAYERS];

main()
{
	print("\n----------------------------------");
	print(" G_wars by CHINMAY KAWLE            ");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	SetGameModeText("G_wars");
	//====team GROVE=====//
    AddPlayerClassEx(0, 105,2526.2241,  -1677.2172, 19.9302,   88.9206,  24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 106,2528.2917,  -1639.5443, 13.9165,   318.8067, 24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 107,2489.9795,  -1646.4088, 14.0772,   175.2360, 24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 195,2459.3452,  -1690.0566, 13.5463,   3.7993,   24,100, 27,100, 18,5);//grove team

    //============team BALLAS====//
    AddPlayerClassEx(1, 102,2149.3672,  -1669.5734, 15.0859,   38.4910,  24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1, 103,2139.7065,  -1685.7714, 15.0859,   326.5673, 24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1, 104,2153.1519,  -1700.3630, 15.0859,   182.9966, 24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1,  13,2134.7634,  -1710.9509, 15.0784,   82.8777,  24,100, 27,100, 18,5);//ballas team

	//===========team cops======//
	AddPlayerClassEx(2, 280,  1568.5359,-1692.8879,  5.8906,  183.4404,  24,100, 27,100, 16,5);//cops team
    AddPlayerClassEx(2, 281,  1585.2015,-1674.1957,  5.8924,  273.7021,  24,100, 27,100, 16,5);//cops team
    AddPlayerClassEx(2, 285,  1579.3569,-1634.7751,  13.5624, 84.3684,   24,100, 27,100, 16,5);//cops team
	AddPlayerClassEx(2, 287,  1552.7753,-1675.3826,  16.1953, 87.0097,   24,100, 27,100, 16,5);//cops team

	//============team BIKERS=====//
	AddPlayerClassEx(3, 181,  1763.6765,-1920.9557,   13.5745, 89.8497,  24,100, 27,100, 16,5 );//bikers team
    AddPlayerClassEx(3, 248,  1762.5662,-1931.7689,   13.5721, 357.7706, 24,100, 27,100, 16,5 );//bikers team
    AddPlayerClassEx(3, 254,  1763.6277,-1911.4078,   13.5698, 181.3230, 24,100, 27,100, 16,5);//bikers team
    AddPlayerClassEx(3, 201,  1755.6136,-1920.6588,   13.5724, 272.7963, 24,100, 27,100, 16,5);//bikers team

	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid); // calls the custom function
    return 1;
}

public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColour(playerid); // calls the custom function
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)

{
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE; // using the defines at the top
    }
    else if(classid == 1)
    {
        gTeam[playerid] = TEAM_BALLAS; // same ^^
    }
    else if(classid == 2)
    {
        gTeam[playerid] = TEAM_COPS; // same ^^
    }
    else if(classid == 3)
    {
        gTeam[playerid] = TEAM_BIKERS; // same ^^
    }
}

SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid,TEAM_GROVE_COLOUR); //green
    }
    else if(gTeam[playerid] == TEAM_BALLAS)
    {
        SetPlayerColor(playerid,TEAM_BALLAS_COLOUR); //purple
    }
    else if(gTeam[playerid] == TEAM_COPS)
    {
        SetPlayerColor(playerid,TEAM_COPS_COLOUR); //blue
    }
    else if(gTeam[playerid] == TEAM_BIKERS)
    {
        SetPlayerColor(playerid,TEAM_BIKERS_COLOUR); //lightblue
    }

}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}
public OnPlayerRequestSpawn(playerid)
{


	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#2

someone plz reply +1 rep for reply
Reply
#3

bump .............................plz someone help damnit
Reply
#4

It can be smart to explain in detail what you want, and remember to use punctuation when you write on forums.

I didnt understand anything of that you wrote in your first post.
Reply
#5

Quote:
Originally Posted by airplanesimen
Посмотреть сообщение
It can be smart to explain in detail what you want, and remember to use punctuation when you write on forums.

I didnt understand anything of that you wrote in your first post.
first of all thnx for the reply ..well yea my english is bad
i just want to colour my team thats it
like grove in green
ballas in purple
cops in blue
bikers in lightblue thats all ....

i saw the tutorial of it and did the exact same thing
made a variable new gTeam[MAX_PLAYERS]; and all but it only coloured some skins ....i want all my grove team in green ,ballas in purple ..........................

understood ?
Reply
#6

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(classid == 0)
    {
        SetPlayerColor(playerid,0x33AA33AA);
    }
    else if(classid == 1)
    {
        SetPlayerColor(playerid,0x800080AA);
    }
    else if(classid == 2)
    {
        SetPlayerColor(playerid,0x0000BBAA);
    }
    else if(classid == 3)
    {
        SetPlayerColor(playerid,0x33CCFFAA);
    }
}
Use this and remove OnPlayerSpawn you already have and tell me if it works.
Reply
#7

it says undefined symbol classid ....
do i have to remove gTeam[MAX_PLAYERS]; :/


Код:
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(96) : warning 217: loose indentation
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(101) : error 017: undefined symbol "classid"
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(105) : error 017: undefined symbol "classid"
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(109) : error 017: undefined symbol "classid"
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(113) : error 017: undefined symbol "classid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#8

Try it like this :
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == GROVE)
    {
        SetPlayerColor(playerid,0x33AA33AA);
    }
    else if(gTeam == TEAM_BALLAS)
    {
        SetPlayerColor(playerid,0x800080AA);
    }
    else if(gTeam == TEAM_COPS)
    {
        SetPlayerColor(playerid,0x0000BBAA);
    }
    else if(gTeam == TEAM_BIKERS)
    {
        SetPlayerColor(playerid,0x33CCFFAA);
    }
}
Reply
#9

error again
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(96) : warning 217: loose indentation
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(101 ) : error 017: undefined symbol "GROVE"
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(105 ) : error 033: array must be indexed (variable "gTeam")
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(109 ) : error 033: array must be indexed (variable "gTeam")
C:\Users\Home\Desktop\0.3e\gamemodes\rated.pwn(113 ) : error 033: array must be indexed (variable "gTeam")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Код:
// killer G_wars
// by- chinmay kawale
//#define FILTERSCRIPT

#include <a_samp>
//================team ids ===============//
#define TEAM_GROVE  0
#define TEAM_BALLAS 1
#define TEAM_COPS   2
#define TEAM_BIKERS 3

//=========colors===========================//
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_TAN 0xBDB76BAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_INVISWHITE 0xFFFFFF00
#define COLOR_DARKRED 0x660000AA


//=======TEAM COLORS=====================//
#define TEAM_GROVE_COLOUR 0x33AA33AA//green duh
#define TEAM_BALLAS_COLOUR 0x800080AA//purple duh
#define TEAM_COPS_COLOUR 0x0000BBAA//blue duh
#define TEAM_BIKERS_COLOUR 0x33CCFFAA//lightblue duh


#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

new gTeam[MAX_PLAYERS];

main()
{
	print("\n----------------------------------");
	print(" G_wars by CHINMAY KAWLE            ");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	SetGameModeText("G_wars");
	//====team GROVE=====//
    AddPlayerClassEx(0, 105,2526.2241,  -1677.2172, 19.9302,   88.9206,  24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 106,2528.2917,  -1639.5443, 13.9165,   318.8067, 24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 107,2489.9795,  -1646.4088, 14.0772,   175.2360, 24,100, 27,100, 18,5);//grove team
    AddPlayerClassEx(0, 195,2459.3452,  -1690.0566, 13.5463,   3.7993,   24,100, 27,100, 18,5);//grove team

    //============team BALLAS====//
    AddPlayerClassEx(1, 102,2149.3672,  -1669.5734, 15.0859,   38.4910,  24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1, 103,2139.7065,  -1685.7714, 15.0859,   326.5673, 24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1, 104,2153.1519,  -1700.3630, 15.0859,   182.9966, 24,100, 27,100, 18,5);//ballas team
    AddPlayerClassEx(1,  13,2134.7634,  -1710.9509, 15.0784,   82.8777,  24,100, 27,100, 18,5);//ballas team

	//===========team cops======//
	AddPlayerClassEx(2, 280,  1568.5359,-1692.8879,  5.8906,  183.4404,  24,100, 27,100, 16,5);//cops team
    AddPlayerClassEx(2, 281,  1585.2015,-1674.1957,  5.8924,  273.7021,  24,100, 27,100, 16,5);//cops team
    AddPlayerClassEx(2, 285,  1579.3569,-1634.7751,  13.5624, 84.3684,   24,100, 27,100, 16,5);//cops team
	AddPlayerClassEx(2, 287,  1552.7753,-1675.3826,  16.1953, 87.0097,   24,100, 27,100, 16,5);//cops team

	//============team BIKERS=====//
	AddPlayerClassEx(3, 181,  1763.6765,-1920.9557,   13.5745, 89.8497,  24,100, 27,100, 16,5 );//bikers team
    AddPlayerClassEx(3, 248,  1762.5662,-1931.7689,   13.5721, 357.7706, 24,100, 27,100, 16,5 );//bikers team
    AddPlayerClassEx(3, 254,  1763.6277,-1911.4078,   13.5698, 181.3230, 24,100, 27,100, 16,5);//bikers team
    AddPlayerClassEx(3, 201,  1755.6136,-1920.6588,   13.5724, 272.7963, 24,100, 27,100, 16,5);//bikers team

	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid); // calls the custom function
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] == GROVE)
    {
        SetPlayerColor(playerid,0x33AA33AA);
    }
    else if(gTeam == TEAM_BALLAS)
    {
        SetPlayerColor(playerid,0x800080AA);
    }
    else if(gTeam == TEAM_COPS)
    {
        SetPlayerColor(playerid,0x0000BBAA);
    }
    else if(gTeam == TEAM_BIKERS)
    {
        SetPlayerColor(playerid,0x33CCFFAA);
    }
}

SetPlayerTeamFromClass(playerid, classid)

{
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE; // using the defines at the top
    }
    else if(classid == 1)
    {
        gTeam[playerid] = TEAM_BALLAS; // same ^^
    }
    else if(classid == 2)
    {
        gTeam[playerid] = TEAM_COPS; // same ^^
    }
    else if(classid == 3)
    {
        gTeam[playerid] = TEAM_BIKERS; // same ^^
    }
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#10

ERRO i'll fix it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)