09.06.2009, 00:37
new chicken;
chicken = CreateObject(16776, -362.0141, 81.74512, 45, 0, 0, 0);
chicken = CreateObject(16776, -362.0141, 81.74512, 45, 0, 0, 0);
pawn Код:
if(!strcmp(cmdtext, "/chickendm", true))
{
if(DMZone[playerid] == 1) return SendClientMessage(playerid,COLOR_RED, "ERROR: You can't use this command in DM!");
DMZone[playerid] = 1;
SetPlayerWorldBounds(playerid, -280.269, -677.3168, 350.3363, -105.1009);
ResetPlayerWeapons(playerid);
new var5 = random(6);
if(!var5)
{
SetPlayerPos(playerid, -607.2495, 128.4566, 50);
SetPlayerFacingAngle(playerid, 247.9705);
SetCameraBehindPlayer(playerid);
}
if(var5 == 1)
{
SetPlayerPos(playerid, -385.3699, 81.74512, 55);
SetPlayerFacingAngle(playerid, 329.4379);
SetCameraBehindPlayer(playerid);
}
if(var5 == 2)
{
SetPlayerPos(playerid, -560.538, 70.06725, 55);
SetPlayerFacingAngle(playerid, 46.832);
SetCameraBehindPlayer(playerid);
}
if(var5 == 3)
{
SetPlayerPos(playerid, -385.3699, 81.74512, 55);
SetPlayerFacingAngle(playerid, 121.7194);
SetCameraBehindPlayer(playerid);
}
if(var5 == 4)
{
SetPlayerPos(playerid, -560.538, 70.06725, 55);
SetPlayerFacingAngle(playerid, 196.27);
SetCameraBehindPlayer(playerid);
}
if(var5 == 5)
{
SetPlayerPos(playerid, -513.8265, 116.7788, 50);
SetPlayerFacingAngle(playerid, 255.2006);
SetCameraBehindPlayer(playerid);
}
SetPlayerInterior(playerid, 0);
AttachObjectToPlayer( chicken, playerid, 1.5, 0.5, 0, 0, 1.5, 2 );
SendClientMessage(playerid, 0x0000FFAA, "You have been teleported to the Chicken DM");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 30, 1000);
GameTextForPlayer(playerid, "Chicken DM", 6000, 6);
GivePlayerWeapon(playerid, 25, 1000);
GivePlayerWeapon(playerid, 29, 1000);
return 1;
}