Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * cSelection - made Awesome class selections!
- *
- * @author iFarbod <[email protected]>
- * @copyright Copyright (C) 2014 iSAMP Gaming
- * @package cSelection
- * @version 1.0.0-alpha.1
- */
- #if defined _cSelection_included
- #endinput
- #endif
- #define _cSelection_included
- /*
- native cS_Show(playerid);
- native cS_Hide(playerid);
- native cS_Update(playerid, color, teamName[], cInfo[]);
- */
- static PlayerText:gcSTeamName[MAX_PLAYERS];
- static PlayerText:gcSClassInfoHeader[MAX_PLAYERS];
- static PlayerText:gcSClassInfo[MAX_PLAYERS];
- static gcSDisplayed[MAX_PLAYERS];
- /**
- * Shows the class selection information text draws for a player.
- * @param int playerid The player ID To show Text draws for him.
- */
- stock cS_Show(playerid)
- {
- PlayerTextDrawShow(playerid, gcSTeamName[playerid]);
- PlayerTextDrawShow(playerid, gcSClassInfoHeader[playerid]);
- PlayerTextDrawShow(playerid, gcSClassInfo[playerid]);
- gcSDisplayed[playerid] = 1;
- }
- /**
- * Hides the class selection information text draws for a player.
- * @param int playerid The player ID To Hide Text draws for him.
- */
- stock cS_Hide(playerid)
- {
- PlayerTextDrawHide(playerid, gcSTeamName[playerid]);
- PlayerTextDrawHide(playerid, gcSClassInfoHeader[playerid]);
- PlayerTextDrawHide(playerid, gcSClassInfo[playerid]);
- gcSDisplayed[playerid] = 0;
- }
- /**
- * @param int playerid The player Id to update for
- * @param int color The color of the Team name string
- * @param string teamName[] The team name string to set
- * @return string cInfo[] the class information string to set
- */
- stock cS_Update(playerid, color, teamName[], cInfo[])
- {
- if(gcSDisplayed[playerid])
- {
- PlayerTextDrawSetString(playerid, gcSTeamName[playerid], teamName);
- PlayerTextDrawSetString(playerid, gcSClassInfo[playerid], cInfo);
- PlayerTextDrawColor(playerid, gcSTeamName[playerid], color);
- cS_Hide(playerid);
- cS_Show(playerid);
- }
- }
- public OnPlayerConnect(playerid)
- {
- gcSTeamName[playerid] = CreatePlayerTextDraw(playerid, 110.000000, 145.000000, "_");
- PlayerTextDrawAlignment(playerid, gcSTeamName[playerid], 2);
- PlayerTextDrawBackgroundColor(playerid, gcSTeamName[playerid], 255);
- PlayerTextDrawFont(playerid, gcSTeamName[playerid], 1);
- PlayerTextDrawLetterSize(playerid, gcSTeamName[playerid], 0.400000, 2.000000);
- PlayerTextDrawColor(playerid, gcSTeamName[playerid], -1);
- PlayerTextDrawSetOutline(playerid, gcSTeamName[playerid], 1);
- PlayerTextDrawSetProportional(playerid, gcSTeamName[playerid], 1);
- PlayerTextDrawSetSelectable(playerid, gcSTeamName[playerid], 0);
- gcSClassInfoHeader[playerid] = CreatePlayerTextDraw(playerid, 110.000000, 170.000000, "CLASS INFORMATION :");
- PlayerTextDrawAlignment(playerid, gcSClassInfoHeader[playerid], 2);
- PlayerTextDrawBackgroundColor(playerid, gcSClassInfoHeader[playerid], 255);
- PlayerTextDrawFont(playerid, gcSClassInfoHeader[playerid], 2);
- PlayerTextDrawLetterSize(playerid, gcSClassInfoHeader[playerid], 0.300000, 1.000000);
- PlayerTextDrawColor(playerid, gcSClassInfoHeader[playerid], -1);
- PlayerTextDrawSetOutline(playerid, gcSClassInfoHeader[playerid], 1);
- PlayerTextDrawSetProportional(playerid, gcSClassInfoHeader[playerid], 1);
- PlayerTextDrawUseBox(playerid, gcSClassInfoHeader[playerid], 1);
- PlayerTextDrawBoxColor(playerid, gcSClassInfoHeader[playerid], 35712);
- PlayerTextDrawTextSize(playerid, gcSClassInfoHeader[playerid], 0.000000, 200.000000);
- PlayerTextDrawSetSelectable(playerid, gcSClassInfoHeader[playerid], 0);
- gcSClassInfo[playerid] = CreatePlayerTextDraw(playerid, 10.000000, 183.500000, "] has access to hq~n~] can plant bomb on grove~n~] can team up with rifa, russian mafia and vagos");
- PlayerTextDrawBackgroundColor(playerid, gcSClassInfo[playerid], 255);
- PlayerTextDrawFont(playerid, gcSClassInfo[playerid], 2);
- PlayerTextDrawLetterSize(playerid, gcSClassInfo[playerid], 0.200000, 1.000000);
- PlayerTextDrawColor(playerid, gcSClassInfo[playerid], -1);
- PlayerTextDrawSetOutline(playerid, gcSClassInfo[playerid], 1);
- PlayerTextDrawSetProportional(playerid, gcSClassInfo[playerid], 1);
- PlayerTextDrawUseBox(playerid, gcSClassInfo[playerid], 1);
- PlayerTextDrawBoxColor(playerid, gcSClassInfo[playerid], 128);
- PlayerTextDrawTextSize(playerid, gcSClassInfo[playerid], 210.000000, 0.000000);
- PlayerTextDrawSetSelectable(playerid, gcSClassInfo[playerid], 0);
- gcSDisplayed[playerid] = 0;
- return CallLocalFunction("CS_OPC", "i", playerid);
- }
- #if defined _ALS_OnPlayerConnect
- #undef OnPlayerConnect
- #else
- #define _ALS_OnPlayerConnect
- #endif
- #define OnPlayerConnect CS_OPC
- forward CS_OPC(playerid);
- public OnPlayerDisconnect(playerid, reason)
- {
- gcSDisplayed[playerid] = 0;
- return CallLocalFunction("CS_OPD", "ii", playerid, reason);
- }
- #if defined _ALS_OnPlayerDisconnect
- #undef OnPlayerDisconnect
- #else
- #define _ALS_OnPlayerDisconnect
- #endif
- #define OnPlayerDisconnect CS_OPD
- forward CS_OPD(playerid, reason);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement