dm script ??
#8

To disable commands just use the Dming variable. Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/SomeCommand", true))
    {
        if(Dming[playerid] == 1) // if in dm
            return SendClientMessage(playerid, -1, "This command is disabled in dms!"); // return error
           
        // Not in dm, do your command.
        return 1;
    }
    return 0;
}
For many spawns you should use Random which generates a pseudo-random number. Example:

pawn Код:
new randSpawn = random(4); // 4 is the highest possible random number. So this is suposed to choose between 4 spawns ('numbers') randomally
// The above code will generate a random number of four numbers (Starting from 0 not 1)
switch(randSpawn)
{
    case 0: // if randSpawn equals to 0 (First Spawn?)
    {
        // Your first spawn place code
    }
    case 1: // if randSpawn equals to 0 (Second Spawn?)
    {
        // Your second spawn place code
    }
    case 2: // if randSpawn equals to 0 (Third Spawn?)
    {
        // Your third spawn place code
    }
    case 3: // if randSpawn equals to 0 (Forth Spawn?)
    {
        // Your forth spawn place code
    }
}
Reply


Messages In This Thread
dm script ?? - by NuLIO - 02.08.2012, 01:05
Re: dm script ?? - by [KHK]Khalid - 02.08.2012, 01:23
Re: dm script ?? - by NuLIO - 02.08.2012, 01:30
Re: dm script ?? - by [KHK]Khalid - 02.08.2012, 01:43
Re: dm script ?? - by NuLIO - 02.08.2012, 02:23
Re: dm script ?? - by [KHK]Khalid - 02.08.2012, 02:31
Re: dm script ?? - by NuLIO - 02.08.2012, 03:14
Re: dm script ?? - by [KHK]Khalid - 02.08.2012, 03:30
Re: dm script ?? - by NuLIO - 02.08.2012, 03:38
Re: dm script ?? - by [KHK]Khalid - 02.08.2012, 04:14

Forum Jump:


Users browsing this thread: 1 Guest(s)