Quote:
Originally Posted by kamilbam
The Map is very good i tried it out, and its working. Took me 2:30 hour to make that database cuz im noob in php na sql but its working now. I got only 1 question how do civilians change clothes cuz if i press f4 na type /kill it only spawn me again. I also tried to use /clothes command in binco but it dosent work for civlianc can so somebody tell me how to change clothes as civilian?
|
Found:
Код:
public OnPlayerRequestClass(playerid, classid)
{
new string[128];
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
ClearChatbox(playerid, 10);
format(string, sizeof(string), "Welcome to Moderntopia Roleplay: Los Santos, running %s", SCRIPT_VERSION);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW2, " ");
if (gPlayerAccount[playerid] != 0)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: You are a registered citizen of San Andreas.");
SendClientMessage(playerid, COLOR_YELLOW2, "Hint: Use /login <password> to log in to your game account.");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: Please supply the necessary immigration documents by typing /register <password>");
SendClientMessage(playerid, COLOR_YELLOW2, "WARNING: The account you create will have limited abilities until you register on http://moderntopia.com/!");
}
SetPlayerCameraPos(playerid, 1500.7156,-1778.1880,80.3080);
SetPlayerCameraLookAt(playerid, 1500.7156,-1778.1880,80.3080);
//PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
SetPlayerTeamFromClass(playerid,classid);
}
else SpawnPlayer(playerid);
return false;
/* if (classid == 1)
{
format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 2)
{
format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 3)
{
format(string, sizeof(string), "~y~> ~p~The Company Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 4)
{
format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 5)
{
format(string, sizeof(string), "~y~> ~p~Slaughta House Boss ~y~< ~n~Bosses only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 6)
{
format(string, sizeof(string), "~y~> ~p~Eastside Hoods Boss ~y~< ~n~Bosses only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 7)
{
format(string, sizeof(string), "~y~> ~p~Governor ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 8)
{
format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 9)
{
format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 10)
{
format(string, sizeof(string), "~y~> ~p~SAPT Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 11)
{
format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 12)
{
format(string, sizeof(string), "~y~> ~p~Nucci Don ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 13)
{
format(string, sizeof(string), "~y~> ~p~Top Shottas Boss ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 14)
{
format(string, sizeof(string), "~y~> ~p~Le Sangre Boss ~y~< ~n~Boss only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 15)
{
format(string, sizeof(string), "~y~> ~p~DRMC Spike~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 16)
{
format(string, sizeof(string), "~y~> ~p~Bratva ~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 17)
{
format(string, sizeof(string), "~y~> ~p~The White Hand ~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else
{
format(string, sizeof(string), " ");
GameTextForPlayer(playerid,string,3500,6);
}
SetupPlayerForClassSelection(playerid);
return 1;*/
}
public OnPlayerRequestSpawn(playerid)
{
return true;
}
public SetupPlayerForClassSelection(playerid)
{
/* switch (gTeam[playerid])
{
case TEAM_BLUE:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
case TEAM_ADMIN:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
default:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
}*/
}
//---------------------------------------------------------
public SetPlayerTeamFromClass(playerid,classid)
{
if (classid >= 1 && classid <= 11)
{
gTeam[playerid] = 11; //admin
PlayerInfo[playerid][pTeam] = 11;
}
else
{
gTeam[playerid] = 3;
PlayerInfo[playerid][pTeam] = 3;
}
}
and replace with this code:
Код:
public OnPlayerRequestClass(playerid, classid)
{
new string[128];
PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pModel] = Peds[classid][0];
if (classid == 1)
{
format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 2)
{
format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 3)
{
format(string, sizeof(string), "~y~> ~p~The Company Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 4)
{
format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 5)
{
format(string, sizeof(string), "~y~> ~p~Slaughta House Boss ~y~< ~n~Bosses only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 6)
{
format(string, sizeof(string), "~y~> ~p~Eastside Hoods Boss ~y~< ~n~Bosses only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 7)
{
format(string, sizeof(string), "~y~> ~p~Governor ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 8)
{
format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 9)
{
format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 10)
{
format(string, sizeof(string), "~y~> ~p~SAPT Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 11)
{
format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 12)
{
format(string, sizeof(string), "~y~> ~p~Nucci Don ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 13)
{
format(string, sizeof(string), "~y~> ~p~Top Shottas Boss ~y~< ~n~Leaders only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 14)
{
format(string, sizeof(string), "~y~> ~p~Le Sangre Boss ~y~< ~n~Boss only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 15)
{
format(string, sizeof(string), "~y~> ~p~DRMC Spike~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 16)
{
format(string, sizeof(string), "~y~> ~p~Bratva ~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else if (classid == 17)
{
format(string, sizeof(string), "~y~> ~p~The White Hand ~y~< ~n~Leader only!");
GameTextForPlayer(playerid,string,3500,6);
}
else
{
format(string, sizeof(string), "~y~> ~g~Civilian ~y~<");
GameTextForPlayer(playerid,string,3500,6);
}
SetPlayerTeamFromClass(playerid,classid);
SetupPlayerForClassSelection(playerid);
ClearChatbox(playerid, 10);
format(string, sizeof(string), "Welcome to Moderntopia Roleplay: Los Santos, running %s", SCRIPT_VERSION);
SendClientMessage(playerid, COLOR_YELLOW, string);
if (gPlayerAccount[playerid] != 0)
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: You are a registered citizen of San Andreas.");
SendClientMessage(playerid, COLOR_YELLOW2, "Hint: Use /login <password> to log in to your game account.");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "Immigration: Please supply the necessary immigration documents by typing /register <password>");
SendClientMessage(playerid, COLOR_YELLOW2, "WARNING: The account you create will have limited abilities until you register on http://moderntopia.com/!");
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return true;
}
public SetupPlayerForClassSelection(playerid)
{
switch (gTeam[playerid])
{
case TEAM_BLUE:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
case TEAM_ADMIN:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
default:
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1833.0959,18.5737,1061.1436);
SetPlayerFacingAngle(playerid,180.0);
SetPlayerCameraPos(playerid, -1833.3585,11.9667,1061.1436);
SetPlayerCameraLookAt(playerid,-1833.0959,18.5737,1061.1436);
}
}
}
//---------------------------------------------------------
public SetPlayerTeamFromClass(playerid,classid)
{
if (classid >= 1 && classid <= 11)
{
gTeam[playerid] = 11; //admin
PlayerInfo[playerid][pTeam] = 11;
}
else
{
gTeam[playerid] = 3;
PlayerInfo[playerid][pTeam] = 3;
}
}