07.07.2014, 05:21
PHP код:
CMD:mini(playerid,params[])
{
if (Mini[playerid] == 0)
{
GameTextForPlayer(playerid, "~r~MINIGUN DM!", 2000, 3);
SendClientMessage(playerid, COLOR_RED, "** Welcome to MINIGUN DM! type {00FF00} /leavemini{ffcc00} to leave the event" );
GetPlayerPos(playerid, xpos,ypos,zpos);
switch(random(4))
{
case 0:
{
SetPlayerPos(playerid,2604.4246,2726.2517,23.8222);
SendClientMessage(playerid,COLOR_RED,"You spawned at Sky Road (/skroad)");
}
case 1:
{
SetPlayerPos(playerid,2597.5359,2780.0967,23.8222);
SendClientMessage(playerid,COLOR_RED,"You spawned at aa. Old Airport (/aa)");
}
case 2:
{
SetPlayerPos(playerid,2608.2749,2731.7131,36.5386);
SendClientMessage(playerid,COLOR_RED,"You spawned at San Fierro (/sf)");
}
case 3:
{
SetPlayerPos(playerid,2643.5828,2776.2068,23.8222);
SendClientMessage(playerid,COLOR_RED,"You spawned at Los Santos (/ls)");
}
}
SetPlayerVirtualWorld(playerid, 1);
SetCameraBehindPlayer(playerid);
SetPlayerTeam(playerid, playerid);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100.0);
Mini[playerid] = 1;
}
if (IsPlayerInAnyVehicle(playerid))
{
RemovePlayerFromVehicle(playerid);
}
GivePlayerWeapon(playerid, 38, 99999);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(stringtele, sizeof(stringtele), "{FFFFFF}%s{6F94CC} has joined a Mini Gun Event!! using {5AD145}(/Mini){E9FA1D}", pname);
SendClientMessageToAll(COLOR_YELLOW, stringtele);
return 1;
}