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]
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
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum