30.11.2013, 12:54
pawn Код:
CMD:sub(playerid, params[])
{
new Float:Pos[3], sub1, sub2;
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(IsInSub[playerid] == false)
{
if(IsPlayerInWater(playerid))
{
IsInSub[playerid] = true;
sub1 = CreateObject(19300, Pos[0] , Pos[1], Pos[2], 0, 0, 0);
sub2 = CreateObject(1612, 0, 0, 0, 0, 0, 0, 0.0);
AttachObjectToObject(sub2, sub1 ,0, 0, 0 + 2, 0, 0, 0, 1);
AttachCameraToObject(playerid, sub2);
SetPlayerPos(playerid, Pos[0], Pos[0], Pos[2]);
SetPlayerInterior(playerid, playerid * playerid + playerid + 3 ^ 2);
ApplyAnimation(playerid, "LOWRIDER", "Sit_relaxed", 4.1, 1, 1, 1, 0, 0, 1);
}
else return SendClientMessage(playerid, -1, "Error: You Need To Be In Water To Use This Command");
}
return 1;
}