public OnPlayerRequestClass(playerid, classid)
{
TogglePlayerControllable(playerid, false);
SetPlayerPos(playerid,1933.6263,-2399.9102,1201.7321);
SetPlayerCameraPos(playerid, 1931.7674, -2417.5302, 1205.6908);
SetPlayerCameraLookAt(playerid, 1931.7674, -2417.5202, 1200.6908);
if(PlayerLogged[playerid] == 0)
{
mysql_reconnect();
new Query[90], EscName[MAX_PLAYER_NAME];
mysql_real_escape_string(PlayerName(playerid), EscName);
format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `username` = '%s'", EscName);
mysql_query(Query);
mysql_store_result();
if(mysql_num_rows() != 0)
{
mysql_free_result();
SendClientMessage(playerid, COLOR_SECURITY, "Please enter your password below to continue.");
DisplayDialogForPlayer(playerid, 1);
return 0;
}
else
{
mysql_free_result();
SendClientMessage(playerid, COLOR_SECURITY, "Please enter a password below to register an account.");
DisplayDialogForPlayer(playerid, 2);
return 0;
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(ChosenClass[playerid] == 0) { DisplayDialogForPlayer(playerid, 4); return 1; }
AntiDeAMX();
/*if(gTeam[playerid] == TEAM_PILOTS)
{
SetPlayerPos(x,y,z pilot);
//SetPlayerTeamColor(playerid);
GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
*/
if(WasSpectating[playerid] == 1)
{
PurelySpawned[playerid] = 1;
SetPlayerInterior(playerid, tempinterior[playerid]);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, tempX[playerid], tempY[playerid], tempZ[playerid]);
SetPlayerFacingAngle(playerid, tempA[playerid]);
UpdateSkin(playerid);
UpdatePlayerColour(playerid);
return 1;
}
RespawnPlayer(playerid);
return 1;
}
new Float:tempX, Float:tempY, Float:tempZ;
You must have atleast 1 AddPlayerClass in your script. https://sampwiki.blast.hk/wiki/AddPlayerClass
|
/*if(gTeam[playerid] == TEAM_PILOTS)
{
SetPlayerPos(x,y,z pilot);
//SetPlayerTeamColor(playerid);
GameTextForPlayer(playerid,"~g~Type ~r~~h~/work ~g~to start working",4000,3);
SendClientMessage(playerid,COLOR_WHITE,"» You are a {1B8AE4}Pilot.{FFFFFF} Type {1B8AE4}/work{FFFFFF} inside of an aircraft to start working.");
SendClientMessage(playerid,COLOR_WHITE,"» You can type {1B8AE4}/phelp {FFFFFF}for your role's commands, or type {1B8AE4}/helpFFFFFF} for general server help.");
*/
I have this in my script..
pawn Код:
|
I have this in my script..
pawn Код:
|
You must have atleast 1 AddPlayerClass in your script. https://sampwiki.blast.hk/wiki/AddPlayerClass
|
That's not true. If you don't add any classes you will spawn near the center of the map as CJ.
@ se7evolution Try updating all of your plugins and includes and recompile. I have had this problem before using mixed up plugin/include versions. |
SA-MP Dedicated Server ---------------------- v0.3e, ©2005-2012 SA-MP Team [18:14:03] [18:14:03] Server Plugins [18:14:03] -------------- [18:14:03] Loading plugin: streamer [18:14:03] *** Streamer Plugin v2.6.1 by Incognito loaded *** [18:14:03] Loaded. [18:14:03] Loading plugin: mysql [18:14:03] SA:MP MySQL Plugin v2.1.1 Loaded. [18:14:03] Loaded. [18:14:03] Loading plugin: sscanf [18:14:03] [MySQL] Thread running. Threadsafe: Yes. [18:14:03] [18:14:03] =============================== [18:14:03] sscanf plugin loaded. [18:14:03] © 2009 Alex "******" Cole [18:14:03] 0.3d-R2 500 Players "dnee" [18:14:03] =============================== [18:14:03] Loaded. [18:14:03] Loaded 3 plugins. [18:14:03] [18:14:03] Filterscripts [18:14:03] --------------- [18:14:03] Loading filterscript 'SpecialMaps.amx'... [18:14:03] Loaded 1 filterscripts. [18:14:03] Script[gamemodes/LoF.amx]: Run time error 19: "File or function is not found" [18:14:03] Number of vehicle models: 0
echo Executing Server Config... lanmode 0 rcon_password 4testtest maxplayers 15 port 7777 hostname test gamemode0 LoF 1 filterscripts SpecialMaps plugins streamer mysql sscanf announce 1 query 1 weburl noneyet onfoot_rate 40 incar_rate 40 weapon_rate 40 stream_distance 300.0 stream_rate 1000 maxnpc 0 logtimeformat [%H:%M:%S]
Are you using threaded MYSQL queries? If not you need to be using the R6 version of the MYSQL plugin and include.
|