[HELP] Random Spawn
#2

Quite simple:
pawn Код:
CMD:minigun(playerid,params[])
{
    if(InAfkZone[playerid]==1) return SendClientMessage(playerid, COLOR_ORANGE, "Nemozete koristiti komande u AFK zoni, upisite /back");
    InDmZone[playerid]=1;
    switch(random(...)) //Add inside the 'random' the max amount of spawns (if you have 4 spawns so write '4' there)
    {
        case 0: SetPlayerPos(...); //Add here the data of the first spawn
        case 1: SetPlayerPos(...); //Same as I mentioned above.
        ....//And so on... Example: If you have 4 spawns so you have to write the cases 0-3 since randoms min choose amount is 0 and not 1
    }
    GivePlayerWeapon(playerid, 38, 9999);
    GetPlayerName(playerid, name, sizeof(name));
    new name[24], string[48];
    format(string, sizeof(string), ""COL_RED"%s "COL_LIGHTBLUE">>/minigun<<", name);
    SendClientMessageToAll(COLOR_GREEN, string);
    return 1;
}

CMD:exitdm(playerid, params[])
{
    if(InAfkZone[playerid]==1) return SendClientMessage(playerid, COLOR_ORANGE, "Nemozete koristiti komande u AFK zoni, upisite /back");
    if(InDMZone[playerid] == 0) return SendClientMessage(playerid, 0xFF0000, "ERROR, you aren't even in DM Zone."); //You can translate it into your language
    InDmZone[playerid] = 0;
    SpawnPlayer(playerid);
    SendClientMessage(playerid, COLOR_KRED, "Napustili ste DM Zonu!");
    return 1;
}
Reply


Messages In This Thread
[HELP] Random Spawn - by System64 - 04.05.2011, 19:55
Re: [HELP] Random Spawn - by BigETI - 04.05.2011, 20:16
Re: [HELP] Random Spawn - by System64 - 04.05.2011, 20:46
Re: [HELP] Random Spawn - by BigETI - 04.05.2011, 21:12
Re: [HELP] Random Spawn - by TheGarfield - 04.05.2011, 21:51
Re: [HELP] Random Spawn - by park4bmx - 04.05.2011, 22:01
Re: [HELP] Random Spawn - by BigETI - 04.05.2011, 23:00
Re: [HELP] Random Spawn - by System64 - 05.05.2011, 06:48
Re: [HELP] Random Spawn - by BigETI - 05.05.2011, 11:32
Re: [HELP] Random Spawn - by System64 - 05.05.2011, 19:31

Forum Jump:


Users browsing this thread: 2 Guest(s)