Вот!!!
[pwn]#include <a_samp>
#include <core>
#include <float> new glob0;
new glob4;
public OnFilterScriptInit()
{
SetTimer("PayDay", 360000, true);
SetTimer("Advertise", 300000, true);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext)
{
new var0[256];
new var1 = 0;
var0 = functionF68(cmdtext, var1);
if(!strcmp(cmdtext, "/repair", true))
{
new var2 = GetPlayerVehicleID(playerid);
if(GetPlayerMoney(playerid) >= 100)
{
if(GetPlayerState(playerid) == 1)
{
SendClientMessage(playerid, 0xFF9900AA, "*АВТОСЛЕСАРЬ*: Вы должны быть в машине!");
return 1;
}
new Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0, Float:var6 = 0.0;
GetVehiclePos(var2, var3, var4, var5);
GetVehicleZAngle(var2, var6);
SetVehiclePos(var2, var3, var4, var5 + 1);
SetVehicleZAngle(var2, var6);
GivePlayerMoney(playerid, -100);
SetVehicleHealth(var2, 1000.0);
SendClientMessage(playerid, 0xFFFF00AA, "*АВТОСЛЕСАРЬ*: Вашу машину починили за 100$");
new var7[30];
new var8[256];
GetPlayerName(playerid, var7, 30);
format(var8, 256, "*Сервер*: %s использовал ремонт (/repair)", var7);
SendClientMessageToAll(0xFF9900AA, var8);
}
else
{
SendClientMessage(playerid, 0xFF9900AA, "*АВТОСЛЕСАРЬ*: У вас не хватает денег!");
}
return 1;
}
if(!strcmp("/count", cmdtext, true, 10))
{
glob0 = 4;
KillTimer(glob4);
glob4 = SetTimer("Countdown", 1000, true);
new var2[30];
new var3[256];
GetPlayerName(playerid, var2, 30);
format(var3, 256, "*Сервер*: %s использовал отсчёт (/count)", var2);
SendClientMessageToAll(0xFF9900AA, var3);
return 1;
}
if(!strcmp("/underwater", cmdtext, true, 10))
{
SetPlayerPos(playerid, 2385.083, 474.7048, -59.6642);
SetPlayerFacingAngle(playerid, 274.7);
SetPlayerInterior(playerid, 0);
new var2[30];
new var3[256];
GetPlayerName(playerid, var2, 30);
format(var3, 256, "*Сервер*: %s попал под воду (/underwater)", var2);
SendClientMessageToAll(0xFF9900AA, var3);
return 1;
}
if(!strcmp("/parachute", cmdtext, true, 10))
{
if(GetPlayerMoney(playerid) > 500)
{
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid, 46, 0);
new var2[30];
new var3[256];
GetPlayerName(playerid, var2, 30);
format(var3, 256, "*Сервер*: %s купил парашут (/parachute)", var2);
SendClientMessageToAll(0xFF9900AA, var3);
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "*АЭРОПОРТ*: У тебя не хватает денег!");
}
return 1;
}
if(!strcmp("/bomb", cmdtext, true))
{
if(GetPlayerMoney(playerid) >= 1000)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, 0xFF9900AA, "*БОМБ_ШОП*: Вы должны быть на ногах!");
return 1;
}
GivePlayerMoney(playerid, -1000);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
new Float:var2 = 0.0, Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0;
GetPlayerPos(playerid, var2, var3, var4);
SetPlayerFacingAngle(playerid, var5);
new var6 = CreateObject(1252, var2, var3 + 1, var4 - 0.5, 0.0, 0.0, 0.0);
SetTimerEx("BombTime", 10000, false, "ffffii", var2, var3, var4);
SetTimerEx("DestroyBomb", 10000, false, "i", var6);
}
else
{
SendClientMessage(playerid, 0xFF9900AA, "*БОМБ_ШОП*: У вас не хватает денег!");
}
return 1;
}
return 0;
}
functionF68(arg0, &arg1)
{
new var0 = strlen(arg0);
while(arg1 < var0 && arg0[arg1] <= 32)
{
arg1++;
}
new var1 = arg1;
new var2[20];
while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19)
{
var2[arg1 - var1] = arg0[arg1];
arg1++;
}
var2[arg1 - var1] = 0;
return var2;
}
public Countdown()
{
new var0[256];
glob0--;
if(glob0 == 3 || glob0 == 2 || glob0 == 1)
{
format(var0, 256, "~r~%d", 0);
for(new var1 = 0; var1 < 200; var1++)
{
GameTextForPlayer(var1, var0, 1000, 3);
PlayerPlaySound(var1, 1056, 0.0, 0.0, 0.0);
}
}
else if(!glob0)
{
new var1 = 0;
while(++var1 < 200)
{
GameTextForPlayer(var1, "~g~GO!!!", 3000, 3);
PlayerPlaySound(var1, 1057, 0.0, 0.0, 0.0);
}
}
return 1;
}
public PayDay(playerid)
{
SendClientMessage(playerid, 0xFFFF00AA, "*Сервер*: Зарплата, вы получили $1500");
GivePlayerMoney(playerid, 5000);
return 0;
}
public BombTime(Float:arg0, Float:arg1, Float:arg2, Float:arg3, arg4, arg5)
{
if(0 < arg4)
{
CreateExplosion(arg0, arg1, arg2, 0, arg3);
arg4--;
SetTimerEx("BombTime", arg5, false, "ffffii", arg0, arg1, arg2, arg3, arg4, arg5);
}
return 0;
}
public DestroyBomb(objectid)
{
DestroyObject(objectid);
return 0;
}
[/pwn]