#include #define TEAM_GROVE 1 #define TEAM_GROVE_COLOR 0x33AA33AA // Green new ClassID[MAX_PLAYERS]; // Array where we will store the classid of all players, see below main() { print("\n----------------------------------"); print(" This is a blank GameModeScript"); print("----------------------------------\n"); } public OnGameModeInit() { SetGameModeText("Blank Script"); AddPlayerClass(0,2496.1418,-1708.5763,1014.7422,0.1684,0,0,0,0,0,0); //CJ AddPlayerClass(105,2348.0396,-1185.3424,1031.9766,92.1934,0,0,0,0,0,0); //Grove1 return 1; } public OnPlayerRequestClass(playerid, classid) { ClassID[playerid] = classid; // Now we store the classid of the player SetupPlayerForClassSelection(playerid); // Here we call the function which is just below return 1; } public SetupPlayerForClassSelection(playerid) { SetPlayerInterior(playerid,14); SetPlayerPos(playerid,258.4893,-41.4008,1002.0234); SetPlayerFacingAngle(playerid, 270.0); SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234); SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234); return 1; } public OnPlayerSpawn(playerid) { if (ClassID[playerid] == 0) // And we check here { SetPlayerPos(playerid,2496.1418,-1708.5763,1014.7422);// CJ HOUSE coords SetPlayerInterior(playerid,3); // CJ HOUSE interior GameTextForPlayer(playerid, "~g~grove street familys", 1000, 3); SetPlayerColor(playerid, TEAM_GROVE_COLOR); } else if (ClassID[playerid] == 1) { // change all these infos (coords, interior, message, color) SetPlayerPos(playerid,10.0,10.0,10.0); SetPlayerInterior(playerid,0); GameTextForPlayer(playerid, "~r~blabla Familys", 1000, 3); SetPlayerColor(playerid, TEAM_GROVE_COLOR); } return 1; }