- เครดิต
- 140
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/eventon", true) == 0)//event0
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0x00F600AA, "USAGE: /eventon [event type]");
SendClientMessage(playerid, 0x00F600AA, "|________EVENT TYPE_______|");
SendClientMessage(playerid, 0x00F600AA, " 0.»Ô´¡Ô¨¡ÃÃÁ");
SendClientMessage(playerid, 0x00F600AA, " 1.à»Ô´¡Ô¨¡ÃÃÁ(»×¹áÅÐöËÒÂ)");
SendClientMessage(playerid, 0x00F600AA, " 2.à»Ô´¡Ô¨¡ÃÃÁ(»Ô¹áÅÐöäÁèËÒÂ)");
SendClientMessage(playerid, 0x00F600AA, " 3.à»Ô´¡Ô¨¡ÃÃÁ(»×¹ËÒÂ)");
SendClientMessage(playerid, 0x00F600AA, " 4.à»Ô´¡Ô¨¡ÃÃÁ(öËÒÂ)");
return 1;
}
new type = strval(tmp);
if(type == 0)
{
etype = 0;
SendClientMessageToAll(0xF60000AA, "[EVENT]: ¢³Ð¹ÕéËÁ´àÇÅÒà¢éÒÃèÇÁ¡Ô¨¡ÃÃÁáÅéÇ, ¢Íº¤Ø³·ÕèÃèÇÁʹء");
}
else if(type == 1)
{
etype = 1;
SendClientMessageToAll(0xF60000AA, "[EVENT]: ¢³Ð¹Õé¶Ö§àÇÅÒ¡Ô¨¡ÃÃÁáÅéÇ, /gogo à¾×èÍà¢éÒÃèÇÁ (»×¹áÅÐöËÒÂ)");
}
else if(type == 2)
{
etype = 2;
SendClientMessageToAll(0xF60000AA, "[EVENT]: ¢³Ð¹Õé¶Ö§àÇÅÒ¡Ô¨¡ÃÃÁáÅéÇ, /gogo à¾×èÍà¢éÒÃèÇÁ (»×¹áÅÐöäÁèËÒÂ)");
}
else if(type == 3)
{
etype = 3;
SendClientMessageToAll(0xF60000AA, "[EVENT]: ¢³Ð¹Õé¶Ö§àÇÅÒ¡Ô¨¡ÃÃÁáÅéÇ, /gogo à¾×èÍà¢éÒÃèÇÁ (»×¹ËÒÂ)");
}
else if(type == 4)
{
etype = 4;
SendClientMessageToAll(0xF60000AA, "[EVENT]: ¢³Ð¹Õé¶Ö§àÇÅÒ¡Ô¨¡ÃÃÁáÅéÇ, /gogo à¾×èÍà¢éÒÃèÇÁ (öËÒÂ)");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/eventmark", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new Float:ax;
new Float:ay;
new Float:az;
GetPlayerPos(playerid, ax, ay, az);
ex = ax;
ey = ay;
ez = az;
eint = GetPlayerInterior(playerid);
SendClientMessage(playerid, COLOR_GRAD1, " Your teleporter destination set");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/gogo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(WantedLevel[playerid] != 0 || PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(playerid,COLOR_RED, " ¤Ø³µÔ´¤Ø¡ÍÂÙè, äÁèÊÒÁÒöÃèÇÁ¡Ô¨¡ÃÃÁä´é");
return 1;
}
if(etype > 0)
{
if(etype == 1)
{
SetPlayerPos(playerid, ex,ey,ez);
ResetPlayerWeapons(playerid);
}
else if(etype == 2)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, ex,ey,ez);
}
else
{
SetPlayerPos(playerid, ex,ey,ez);
}
}
else if(etype == 3)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, ex,ey,ez);
}
else
{
SetPlayerPos(playerid, ex,ey,ez);
}
ResetPlayerWeapons(playerid);
}
else if(etype == 4)
{
SetPlayerPos(playerid, ex,ey,ez);
}
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessage(playerid,COLOR_RED, " ¤Ø³ÁҶ֧ʶҹ·Õè¨Ñ´¡Ô¨¡ÃÃÁáÅéÇ");
SetPlayerInterior(playerid,eint);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[EVENT]: ¢³Ð¹ÕéËÁ´àÇÅÒà¢éÒÃèÇÁ¡Ô¨¡ÃÃÁáÅéÇ, ¢Íº¤Ø³·ÕèÃèÇÁʹء");
}
}
return 1;
} |
|