Text and Skin show when we choose class
#5

Quote:
Originally Posted by Jerry12
Посмотреть сообщение
Try this it may help you out:

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
//]]========: TEAMS :=======[[//
#define TEAM_COP 0
#define TEAM_CIVI 5
#define TEAM_NONE 6
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
public 
OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("OnPlayerRequestClass");
    
AddPlayerClass2881958.37831343.157215.3746269.142500000); // Cop
    
AddPlayerClass3111958.37831343.157215.3746269.142500000); // Cop
    
AddPlayerClass3101958.37831343.157215.3746269.142500000); // Cop
    
AddPlayerClass1761958.37831343.157215.3746269.142500000); // Robber
    
AddPlayerClass1771958.37831343.157215.3746269.142500000); // Robber
    
AddPlayerClass2931958.37831343.157215.3746269.142500000); // Robber
    
return 1;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    switch ( 
classid // This is like a if/elseif statement.
    
{
        case 
0// If the classid is 0
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~B~Cops"3000);
            
SetPlayerTeamplayeridTEAM_COP ); // Sets the player's team to TEAM_BALLAS
        
}
        case 
1// If the classid is 1
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~B~Cops"3000);
            
SetPlayerTeamplayeridTEAM_COP ); // Sets the player's team to TEAM_CJ
        
}
        case 
2// If the classid is 1
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~B~Cops"3000);
            
SetPlayerTeamplayeridTEAM_COP ); // Sets the player's team to TEAM_CJ
        
}
        case 
3// If the classid is 2
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~W~Civilian"3000);
            
SetPlayerTeamplayeridTEAM_CIVI ); // Sets the player's team to TEAM_CJ
        
}
        case 
4// If the classid is 2
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~W~Civilian"3000);
            
SetPlayerTeamplayeridTEAM_CIVI ); // Sets the player's team to TEAM_CJ
        
}
        case 
5// If the classid is 2
        
// Then
            
GameTextForPlayerplayerid"~Y~Los Santos ~W~Civilian"3000);
            
// Sends a gametext for player
            // ~g~ is a green color in gametext.
            // Arguments : Player ID, const string[ ], time ( milliseconds ), style
            // Wiki for more info
            
SetPlayerTeamplayeridTEAM_CIVI ); // Sets the player's team to TEAM_CJ
        
}
    }
    return 
1// This means the callback is executed succesfully AFAIK.

and if you didn't understood any step from mine,

Try reading and understand this tutorial:

Click Here
not working
Reply


Messages In This Thread
Text and Skin show when we choose class - by StevenLV - 21.05.2017, 11:35
Re: Text and Skin show when we choose class - by StrikerZ - 21.05.2017, 12:17
Re: Text and Skin show when we choose class - by Sew_Sumi - 21.05.2017, 12:49
Re: Text and Skin show when we choose class - by Jerry12 - 21.05.2017, 13:15
Re: Text and Skin show when we choose class - by StevenLV - 22.05.2017, 04:38
Re: Text and Skin show when we choose class - by Sew_Sumi - 22.05.2017, 11:32
Re: Text and Skin show when we choose class - by StevenLV - 23.05.2017, 04:39
Re: Text and Skin show when we choose class - by Sew_Sumi - 23.05.2017, 06:17

Forum Jump:


Users browsing this thread: 2 Guest(s)