15.04.2015, 21:14
This is the OnPlayerSpawn:
All of this works, but the OnPlayerRequestSpawn doesn't. I don't have any enum in my code. I did ctrl + f and typed enum, nothing found.
Код:
case TEAM_CIA: {
new name[ MAX_PLAYER_NAME ];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
SetPlayerPos(playerid,gCIASP[rand][0],gCIASP[rand][1],gCIASP[rand][2]);
SetPlayerFacingAngle(playerid,gCIASP[rand][3]);
SendClientMessage(playerid, HOODLUMS_COLOR, "If you are not an official member of the CIA, F4 + /kill and choose another class.");
SendClientMessage(playerid, HOODLUMS_COLOR, "If you are caught by an administrator in this class and you're not supposed to be, you will be punished.");
SendClientMessage(playerid, HOODLUMS_COLOR, "If you are not a member of the CIA, but would like to be, apply on gw-dm.boards.net");
if(strfind(name,"[CIA]",true) != -1)
SendClientMessage(playerid, HOODLUMS_COLOR, "You have spawned as an official Central Intelligence Agency member.");
return 1;
}
case TEAM_ED: {
new name[ MAX_PLAYER_NAME ];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
SetPlayerPos(playerid,gEDSP[rand][0],gEDSP[rand][1],gEDSP[rand][2]);
SetPlayerFacingAngle(playerid,gEDSP[rand][3]);
SendClientMessage(playerid, WORKERS_COLOR, "If you are not an official member of the Electric Drifters, F4 + /kill and choose another class.");
SendClientMessage(playerid, WORKERS_COLOR, "If you are caught by an administrator in this class and you're not supposed to be, you will be punished.");
SendClientMessage(playerid, WORKERS_COLOR, "If you are not a member of the Electric Drifters, but would like to be, apply on gw-dm.boards.net");
if(strfind(name,"[ED]",true) != -1)
SendClientMessage(playerid, WORKERS_COLOR, "You have spawned as an official Electric Drifters member.");
return 1;
}
}

