PDA

View Full Version : Player doesnt spawns


KosmasRego
13/07/2012, 10:04 PM
Fixed. - - -- - -

Kirollos
13/07/2012, 10:30 PM
show me your public OnPlayerRequestClass and public OnGameModeInit()

KosmasRego
13/07/2012, 10:48 PM
Request Class

public OnPlayerRequestClass(playerid, classid)
{
PlayerInfo[playerid][pModel] = Peds[classid][0];
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
return 1;
}
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
ClearChatbox(playerid, 10);
ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"UK:RP Information","{B35959}Server Information \n\n{00FF00}Server IP: {FFD90F}78.129.221.58 {00FF00}Port: {FFD90F}7799 \n\n{00FF00}Server Website: {FFD90F}http://www.uk-rp.co.uk/ \n\n{00FF00}Server TeamSpeak: {FFD90F}146.185.28.163:7930","Continue","Quit");
PlayerInfo[playerid][pModel] = Peds[classid][0];
SetPlayerTeamFromClass(playerid,classid);
SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, " Please Note: We do not give refunds to begginers.");
SendClientMessage(playerid, COLOR_BLUE, "__________________________________________________ ______");
SendClientMessage(playerid, COLOR_RED, " Welcome To Official UK:RP");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Welcome To The UK-RP SA-MP Server");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Community Owner: Jake_Tierra");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Server Scripters: Jake_Tierra & Leroy_Hudson");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Server Co-Owner: Mark_Sanchez");
SendClientMessage(playerid, COLOR_BLUE, "__________________________________________________ _______");
SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, "You will be asked to register/login soon.");
SendClientMessage(playerid, COLOR_LIGHTBLUEGREEN, "Please wait...Files loading...");
}
else
{
SpawnPlayer(playerid);
}
return false;
}


GameModeInit

public OnGameModeInit()
{
ShowPlayerMarkers(2);
LimitPlayerMarkerRadius(10);

grovestreet = GangZoneCreate(2220.01, -1733.182, 2528.039, -1654.228);

LoadVehicles();
LoadDealerships();
LoadFuelStations();

for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
OnPlayerConnect(i);
}
}
for(new i=1; i < MAX_DVEHICLES; i++)
{
UpdateVehicle(i, 0);
}
for(new i=1; i < MAX_DEALERSHIPS; i++)
{
UpdateDealership(i, 0);
}
for(new i=1; i < MAX_FUEL_STATIONS; i++)
{
UpdateFuelStation(i, 0);
}

maintimer = SetTimer("MainTimer", 1000, true);
speedotimer = SetTimer("Speedometer", 555, true);
savetimer = SetTimer("SaveTimer", 2222, true);
return 1;
}

MP2
14/07/2012, 12:02 AM
You can't use SpawnPlayer in OnPlayerRequestClass. Set a 1 milisecond timer and SpawnPlayer() in there.

KosmasRego
14/07/2012, 12:11 AM
You can't use SpawnPlayer in OnPlayerRequestClass. Set a 1 milisecond timer and SpawnPlayer() in there.
It was always working before why it didnt just when I put some new things?

MP2
14/07/2012, 12:17 AM
I don't know? SpawnPlayer has never worked for me under OnPlayerRequestClass.

KosmasRego
14/07/2012, 09:35 AM
I just copied everything from a filterscript to the gamemode to put it together what have I done wrong? :S

[MM]RoXoR[FS]
14/07/2012, 09:43 AM
Use SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo) before SpawnPlayer

KosmasRego
14/07/2012, 09:48 AM
That's not the problem exactly because it never have done it before. I added a new filterscript and copied everything from it and put them in the gamemode.pwn and it stops at the request class.

clarencecuzz
14/07/2012, 09:53 AM
Show your public OnPlayerRequestSpawn, it is probably returning 0.

KosmasRego
14/07/2012, 10:08 AM
No it is not.