[HELP]A DM with random spawns
#4

pawn Код:
if ((strcmp("/dm1", cmdtext, true, 10) == 0)&&(IsPlayerInDM[playerid] == 0))
    {
        new pName[MAX_PLAYER_NAME];
    new string[256];
        IsPlayerInDM[playerid] = 1;
        GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s has entered dm1. Type /dm1 to pwn him", pName);
    SendClientMessageToAll(0xFFFFAEFF, string);
    const MAX_POSITIONS = 3;
static Float:Positions[MAX_POSITIONS][4] =
{
    {0.0, 0.0, 0.0, 0.0}, // pos 1
    {0.0, 0.0, 0.0, 0.0}, // pos 2
    {0.0, 0.0, 0.0, 0.0} // pos 3
}, bool:taken[MAX_POSITIONS];
new freePos;
for(; freePos < MAX_POSITIONS; freePos++)
    if(!taken[freePos]) break;
if(freePos == MAX_POSITIONS) return 1; //no free positions left
SetPlayerPos(playerid, Positions[freePos][0], Positions[freePos][1], Positions[freePos][2]);
SetPlayerFacingAngle(playerid, Positions[freePos][3]);
taken[freePos] = true;
There, but you must fix the intendation, do you have teamviewer? If so, I can help you ( by controlling your pc and editing the script from my pc)
Reply


Messages In This Thread
[HELP]A DM with random spawns - by 17badboy17 - 03.04.2009, 19:26
Re: [HELP]A DM with random spawns - by Klutty - 03.04.2009, 19:46
Re: [HELP]A DM with random spawns - by 17badboy17 - 03.04.2009, 20:10
Re: [HELP]A DM with random spawns - by Klutty - 03.04.2009, 20:13

Forum Jump:


Users browsing this thread: 1 Guest(s)