Help me again....
#1

I've finished the bad entry thingy, but I've got another problem. I've done a Test gamemode, now I've made classes spawn but I keep spawning at the electric staircases. Here's the code.

Код:
public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
	AddPlayerClass(107,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
AddPlayerClass(106,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
AddPlayerClass(105,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
AddPlayerClass(108,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
AddPlayerClass(109,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
AddPlayerClass(110,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
AddPlayerClass(102,2521.2722,-1678.7083,15.3522,82.8959,22,9999,31,999);
AddPlayerClass(103,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
AddPlayerClass(104,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
AddPlayerClass(114,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
AddPlayerClass(115,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
AddPlayerClass(116,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
AddPlayerClass(120,2521.2722,-1678.7083,15.3522,82.8959,8,0,31,999,24,999);
AddPlayerClass(179,2521.2722,-1678.7083,15.3522,82.8959,30,500,22,490,29,800);
AddPlayerClass(194,2521.2722,-1678.7083,15.3522,82.8959,10,0,31,2000,30,2000);

AddStaticVehicle(447,2529.5759,-1678.2296,19.9419,91.5106,75,2);
AddStaticVehicle(490,2494.3008,-1654.5840,13.5311,249.8709,0,0);
AddStaticVehicle(451,2473.8311,-1700.7242,13.2273,177.6675,125,125);
AddStaticVehicle(522,2528.0742,-1689.7404,13.2581,80.6985,6,25);
AddStaticVehicle(522,2527.1887,-1689.2676,13.2201,63.1784,6,25);


	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid,1679.3407,14.8529,88.2490);
	SetPlayerFacingAngle(playerid,90.0);
	SetPlayerCameraPos(playerid,2513.6995,-1675.4047,13.5563,250.6615);
	SetPlayerCameraLookAt(playerid,2513.6995,-1675.4047,13.5563,250.6615);
	return 1;
}

public OnPlayerConnect(playerid)
GameTextForPlayer(playerid, "~b~Hello, Welcome to our server, remember to read /rules!",10000,6);
{
	return 1;
}
And I still spawn as a CJ in LV at some staircases and + theese coordinates are near Sweet's house if that makes anything easier.
What do I do?
Reply
#2

I would take a look at some sample gamemodes
Reply
#3

This is your player spawn LOCATION:

Код:
2521.2722,-1678.7083,15.3522,82.8959
So you must configure it like so:

Код:
(class id, x ,y ,z , rotation, gun, ammo, gun, ammo, gun ammo);
The script is cleaner with an example on top see this:

Код:
public OnGameModeInit()
{
	SetGameModeText("Blank Script"); //Your gamemode name
	//(class id, x ,y ,z , rotation, gun, ammo, gun, ammo, gun ammo);
	AddPlayerClass(107,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400); 
	AddPlayerClass(106,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
	AddPlayerClass(105,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
	AddPlayerClass(108,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
	AddPlayerClass(109,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
	AddPlayerClass(110,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
	AddPlayerClass(102,2521.2722,-1678.7083,15.3522,82.8959,22,9999,31,999);
	AddPlayerClass(103,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
	AddPlayerClass(104,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
	AddPlayerClass(114,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
	AddPlayerClass(115,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
	AddPlayerClass(116,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
	AddPlayerClass(120,2521.2722,-1678.7083,15.3522,82.8959,8,0,31,999,24,999);
	AddPlayerClass(179,2521.2722,-1678.7083,15.3522,82.8959,30,500,22,490,29,800);
	AddPlayerClass(194,2521.2722,-1678.7083,15.3522,82.8959,10,0,31,2000,30,2000);
	//vehicleid, x,y,z,rotation, color, color);
	AddStaticVehicle(447,2529.5759,-1678.2296,19.9419,91.5106,75,2);
	AddStaticVehicle(490,2494.3008,-1654.5840,13.5311,249.8709,0,0);
	AddStaticVehicle(451,2473.8311,-1700.7242,13.2273,177.6675,125,125);
	AddStaticVehicle(522,2528.0742,-1689.7404,13.2581,80.6985,6,25);
	AddStaticVehicle(522,2527.1887,-1689.2676,13.2201,63.1784,6,25);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid) //the spawn screen location
{
	SetPlayerPos(playerid,1679.3407,14.8529,88.2490);
	SetPlayerFacingAngle(playerid,90.0);
	SetPlayerCameraPos(playerid,2513.6995,-1675.4047,13.5563,250.6615);
	SetPlayerCameraLookAt(playerid,2513.6995,-1675.4047,13.5563,250.6615);
	return 1;
}

public OnPlayerConnect(playerid) //Always keep your codes after { not before.
{
    GameTextForPlayer(playerid, "~b~Hello, Welcome to our server, remember to read /rules!",10000,6);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)