How to create rounds?
#1

Hello I am creating a gamemode of hunger games and need a little tutorial on how to create rounds with time and random spawns.

I also need that when a player enters the sv when a round has already started spectating stay until Begin a new round


Please help me!
Reply
#2

So basicly you want a person to create the whole gamemode for you?
You can get most of this information if you search the SA-MP Wiki.
Reply
#3

Nah xFallen,

@cleme just use this tutorial:
https://sampforum.blast.hk/showthread.php?tid=269336

and ****** "how to make random spawns samp"

Goodluck!
Reply
#4

Thanks voxel, im using the system of kitten before this post xd but i need random spawns and spec when a player enter to the server when a round started can you help me? (= i only want a little tutorial please
Reply
#5

random spawns aint so random check this
pawn Код:
new Float:RandomSpawns[][] =
{
    {1249.7258, -2047.9263, 59.9209, 90.2055}, // Randomspawn
    {1241.2084, -2057.6521, 60.0190, 94.9352}, // Randomspawn
    {1241.0105, -2052.6873, 59.9975, 2.8144}, // Randomspawn
    {718.4906, -1477.3024, 5.4688, 357.9947}, // Randomspawn
    {722.3772, -1477.2856, 5.4688, 272.3814} // Randomspawn
};
etc
Reply
#6

public OnPlayerSpawn(playerid) * * * * * * * * * *// OnPlayerSpawn Callback
{
* * switch ( MapChange *) { * * * * * * * * * * * // you must have a case for the mapchange to get the list going
* * * * case 0: * * * * * * * * * * * * * * * * * // MapChange1 this is the part for MapChange = 0; Which basically starts of the first MapChangein the list
* * * * {
* * * * * * SetPlayerPos(playerid, X,Y,Z); * * * *// XYZ Co-rds of the first map
* * * * * * SetPlayerFacingAngle(playerid,0.0); * // Facing Angle of the first map
* * * * }
* * * * case 1: * * * * * * * * * * * * * * * * * // MapChange2 same settings on top
* * * * {
* * * * * * SetPlayerPos(playerid, X,Y,Z);
* * * * * * SetPlayerFacingAngle(playerid,0.0);
* * * * }
* * * * case 2: * * * * * * * * * * * * * * * * * // blah blah next MapChangestuff here
* * * * {

* * * * }
* * }
* * return 1;
}



How to create random spawns here?
Reply
#7

Setplayerpos(playerid,randomspawns); ?? Xd
Reply
#8

pawn Код:
new bool:Joinedhunger[MAX_PLAYERS];//in the top of your script
CMD:hunger(playerid,params[])
{
    Joinedhunger[playerid] = true;
    SetTimer("Rounds",10000,true);
    return 1;
}
CMD:leavehunger(playerid,params[])
{
    Joinedhunger[playerid] = false;
    Spawn(playerid);
    return 1;
}
new Float:RandomSpawn[][4] =
{
    //change this postions to your floats you want to set for tha player.
    {-2796.9854, 1224.8180, 20.5429, 192.0335},
    {-2454.2170, 503.8759, 30.0790, 267.2932},
    {-2669.7322, -6.0874, 6.1328, 89.8853}
};
forward Rounds();
forward Rounds();
{
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
}
I've set the postions change every 10 seconds (10,000 milliseconds) you can change that , i hope i understand what you looking for.
Reply
#9

Hmm ok thanks silent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)