29.09.2014, 20:38
First read 'https://sampwiki.blast.hk/wiki/Main_Page'
PHP код:
//Top
new Float:RandomSpawns[4][3] = {
{X,Y,Z},//Replace with your Spawn 1 Coords
{X,Y,Z},//Replace with your Spawn 2 Coords
{X,Y,Z},//Replace with your Spawn 3 Coords
{X,Y,Z} //Replace with your Spawn 4 Coords
};
//Command or what ever
new rand = random(3);
SetPlayerPos(playerid,RandomSpawns[rand][0],RandomSpawns[rand][1],RandomSpawns[rand][2]);
public OnGameModeInit()
{
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//Civillian (classid = 0)
AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);//Cop (classid = 1)
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
GameTextForPlayer(playerid,"~r~Civillian",1000,3);
}
if(classid == 1)
{
GameTextForPlayer(playerid,"~b~Cop",1000,3);
}
return 1;
}