Is this possible? about Virtual World
#1

I want to make if there are 2 players dueling in virtual world 10, and if 2 more wants to duel they should go in virtual world 11 and so on, so they don't disturb players dueling in virtual world 10, i don't know how to check there are players in virtual world 10 or not :\ can anyone help plz

pawn Код:
new IsInDuel[MAX_PLAYERS];
new Dueler[MAX_PLAYERS];
And here's the /accept command

pawn Код:
CMD:accept(playerid, params[])
{
    new string[128];
    if(IsInDuel[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You Are Already in Duel!");
    if(Dueler[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "No one has sent you a Duel Request.");

    format(string, sizeof(string), "** %s (%d) Has Accepted Your Duel Request", GetName(playerid), playerid);
    SendClientMessage(Dueler[playerid], COLOR_ORANGE, string);
    format(string, sizeof(string), "You've Accepted %s (%d) Duel Request", GetName(Dueler[playerid]), Dueler[playerid]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

    format(string, sizeof(string), "The Duel Between %s and %s Has Started!", GetName(Dueler[playerid]), GetName(playerid));
    SendClientMessageToAll(COLOR_ORANGE, string);
   
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    GetPlayerPos(Dueler[playerid], x, y, z);
    SetPlayerInterior(playerid, 16);
    SetPlayerInterior(Dueler[playerid], 16);
    SetPlayerVirtualWorld(playerid, 10);
    SetPlayerVirtualWorld(Dueler[playerid], 10);
    SetPlayerPos(playerid, -1395.067, 1261.3706, 1042.8672);
    SetPlayerPos(Dueler[playerid], -1395.067, 1261.3706, 1042.8672);
    SetPlayerHealth(playerid, 100.0);
    SetPlayerHealth(Dueler[playerid], 100.0);
    SetPlayerArmour(playerid, 100.0);
    SetPlayerArmour(Dueler[playerid], 100.0);
    IsInDuel[playerid] = 1;
    IsInDuel[Dueler[playerid]] = 1;
    return 1;
}
Reply


Messages In This Thread
Is this possible? about Virtual World - by Nubik - 01.06.2013, 06:05
Respuesta: Is this possible? about Virtual World - by JustBored - 01.06.2013, 06:08
Re: Is this possible? about Virtual World - by nmader - 01.06.2013, 06:56

Forum Jump:


Users browsing this thread: 1 Guest(s)