FiveGame SA:MP GameMod, Tutoriale

Alăturați-vă forumului, este rapid și ușor

FiveGame SA:MP GameMod, Tutoriale
FiveGame SA:MP GameMod, Tutoriale
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

FiveGame SA:MP Daca aveti orice fel de intrebari nu ezitati sa ne contactati. O zi buna, Echipa
Forumul FiveGame este in cautare de persoane capabile pentru a modera forumul și pentru a ajuta utilizatorii la nevoie.
Salut, vreau sa va anunț ca în

In jos
InceMan
InceMan
Administrator
Administrator
Mesaje : 526
Data de inscriere : 02/10/2015
Varsta: : 31
Localizare: : Neamt
https://fivegame.all-up.com

tutorial startevent, joinevent , stopevent. Empty tutorial startevent, joinevent , stopevent.

7/11/2021, 10:20
Salut va prezint un mic tutorial pentru incepaturi sper sa va fie de folos.

Autor: InceMan
[ltr]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;
}[/ltr]

Shower apreciază acest mesaj

Sus
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum