Jump to content

Ma poate ajuta cine-va ? cand dau /joinevent pot intra in event chiar daca variabila este pe 0 ! Cand un player se conecteaza este setata pe zero !


GamerulFOX

Recommended Posts

CMD:joinevent(playerid, params[])
{
    if(Event[playerid] = 0) return SendClientMessage(playerid, 0xff0000FF, "Nu este un event activ!");
    if(Event[playerid] = 1){
        SendClientMessage(playerid, 0xff0000FF, "Ai fost teleportat la event!");
        SetPlayerPos(playerid, 2562.6992, -1283.9130, 1035.0000);
        pEvent[playerid] = 1;
        return 1;
    }
    return 1;
}

Link to comment
Share on other sites

@GamerulFOX uite ca nu am mai ajutat de mult pe aici o sa te ajut  cu startevent , joinevent , stopevent .

pps: bine inteles se mai poate face modificari sa pui si bani automat cand faci un event etc asta te preocupa pe tine ce vrei sa faci pe mai departe.

new Event_Int, Event_World, vwp[MAX_PLAYERS], innt[MAX_PLAYERS], Event_Joinable, Float: Event_Pos[3];

CMD:joinevent(playerid, params[])
{
    if(IsPlayerConnected(playerid)) 
    {
        if(!Event_Joinable) return SendClientMessage(playerid, COLOR_DARKGRAY, "There is not any event on going.");
        if(IsPlayerInRangeOfPoint(playerid, 140.0, Event_Pos[0], Event_Pos[1], Event_Pos[2])) return SendClientMessage(playerid, COLOR_DARKGRAY, "You are already taking part at this event.");
        SetPlayerInterior(playerid, Event_Int), SetPlayerVirtualWorld(playerid, Event_World);
        SetPlayerPos(playerid, Event_Pos[0], Event_Pos[1], Event_Pos[2]+1);
        ResetPlayerWeapons(playerid);
        SendClientMessage(playerid, 0xA2E261FF, "[EVENT]: You have joined the event !");
    }
    return 1;
}

CMD:startevent(playerid, params[])
{
    if(IsPlayerConnected(playerid)) 
    // Aici pui tu restrictia de admin.
    {
        GetPlayerPos(playerid, Event_Pos[0], Event_Pos[1], Event_Pos[2]);
        Event_Int = innt[playerid];
        Event_World = vwp[playerid];
        SendClientMessageToAll(playerid, 0xA2E261FF, "[EVENT]: Type /joinevent to join it !");
            
    }
    return 1;
}

CMD:stopevent(playerid, params[])
{
    // Aici pui tu restrictia de admin.
    if (Event_Pos[0] == 0.0 && Event_Pos[1] == 0.0) return SendClientMessage(playerid, COLOR_DARKGRAY, "There is no event on going.");
    SendEventMessage(0xA2E261FF, "[EVENT]: Event joins have been stopped. No one can join the event from now.");
    Event_Joinable = false;
    return 1;
}

 

  • Like 1

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.