26.11.2011, 23:25
Hi im starting a basic script TDM, I folowed a small tutorial but when I start the game I can't see the skins
Pictures
http://imageshack.us/photo/my-images/202/help101.jpg/
Code:
Can anyone help me please? I would like to see the skins and the GameTextForPlayer
Pictures
http://imageshack.us/photo/my-images/202/help101.jpg/
Code:
Код:
#include < a_samp > //TEAM #define TEAM_BLOODS 0 // Defines TEAM_BLOODS as team ID 0 #define TEAM_CRIPS 1 // Defines TEAM_CRIPS as team ID 1 #define TEAM_ARMY 2 // Defines TEAM_ARMY as team ID 2 //COLORS #define COLOR_GREY 0xAFAFAFAA //grey #define COLOR_LIGHTGREEN 0x81F628AA //lightgreen #define COLOR_YELLOW 0xFFFF00AA //yellow #define COLOR_LIGHTBLUE 0x33CCFFAA //lightblue #define COLOR_BLUE 0x0050F6AA //blue #define COLOR_GREEN 0x33AA33AA //green #define COLOR_RED 0xF60000AA //red #define COLOR_ORANGE 0xFF9900AA //orange #define COLOR_LIGHTRED 0xF60000AA //lightred #define COLOR_WHITE 0xFFFFFFFF //white #define COLOR_BLACK 0x000000AA //black #define COLOR_ZADMINBLUE 0x6D4CEBAA main() { print( "Bloods VS Crips Has been loaded" ); } public OnGameModeInit( ) // This callback is called when the gamemode is started. { //Bloods AddPlayerClass(19, 1958.3783, 1343.1572, 15.3746, 269.1425, 5, 0, 22, 100, 32, 50 ); AddPlayerClass(40, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(49, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(80, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(264, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //Crips AddPlayerClass(21, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(175, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(84, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(81, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(177, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //Army AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(250, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(206, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(179, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddPlayerClass(122, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; // This means, the gamemode is processed succesfully AFAIK. } public OnPlayerRequestClass( playerid, classid ) // This is called when a player is on class selection { switch ( classid ) // This is like a if/elseif statement. { case 19,40,49,80,264: // If the classid is 0 { //Then GameTextForPlayer( playerid, "~r~TEAM BLOODS", 300, 3 ); SetPlayerTeam( playerid, TEAM_BLOODS ); // Sets the player's team to TEAM_BLOODS SetPlayerColor(playerid,COLOR_RED); } case 21,175,84,81,177: // If the classid is 1 { // Then GameTextForPlayer( playerid, "~b~TEAM Crips", 300, 3 ); SetPlayerTeam( playerid, TEAM_CRIPS ); // Sets the player's team to TEAM_CRIPS SetPlayerColor(playerid,COLOR_BLUE); } case 287,250,206,179,122: // If the classid is 2 { // Then GameTextForPlayer( playerid, "~g~TEAM ARMY", 300, 3 ); SetPlayerTeam( playerid, TEAM_ARMY ); // Sets the player's team to TEAM_CJ SetPlayerColor(playerid,COLOR_GREEN); } } return 1; // This means the callback is executed succesfully AFAIK. } public OnPlayerDeath( playerid, killerid, reason ) // This is called when a player deaths. { if ( killerid != INVALID_PLAYER_ID ) // If the killerid are NOT an invalid player { // Then if ( GetPlayerTeam( killerid ) == GetPlayerTeam( playerid ) ) // IIf killerid's team == playerid's team ( who has been killed ) { // Then SetPlayerHealth( killerid, -1 ); // Kills the killer ( Setting the health to -1 ). SendClientMessage( killerid, -1, "No Teamkilling." ); // Sends a message to the killer with a white colour ( -1 ), with the message " No teamkilling. ". GivePlayerMoney( killerid, - 5000 ); // Take $5000 from the killerid, because teamkilling, } else // Another team killed the player { SendClientMessage( killerid, -1, "Nice shot!" ); // Sends a message to the killer with a white colour ( -1 ) with the message "Nice Shot! ". GivePlayerMoney( killerid, 5000 ); // Gives the killerid $5000. } } SendDeathMessage( killerid, playerid, reason ); // Sends a death message about the killerid is killing the player, with the reason ( At the middle right of your game, can be toggled by pressing F9 ). return 1; // This means the callback is executed succesfully AFAIK. }