- Автор темы
- #1
Pawn:
#include <a_samp>
#include <Pawn.CMD>
new carjacking;
new bool:carsjacking;
public OnPlayerConnect(playerid)
{
carsjacking = false;
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(carsjacking == true)
{
SendClientMessage(playerid, -1, "* Вы успешно сдали авто, получайте награду");
new dollors;
dollors = random(21374);
GivePlayerMoney(playerid, dollors);
carsjacking = false;
DestroyVehicle(carjacking);
}
return 1;
}
CMD:carjack(playerid)
{
if(carsjacking == true)
{
SendClientMessage(playerid, -1, "* Вы уже начали автоугон, отправляйтесь к транспорту");
}
else
{
StartJobCarJacking(playerid);
}
}
stock StartJobCarJacking(playerid)
{
new model;
model = random(6);
switch(model)
{
case 0:
{
carjacking = CreateVehicle(401, -1791.5878, 1312.0227, 59.7344, 349.1336, 1, 1, 0, 0);
SetPlayerCheckpoint(playerid, -1791.5878, 1312.0227, 59.7344, 7);
}
case 1:
{
carjacking = CreateVehicle(404, -2759.3413, -1.0189, 6.9737, 357.2996, 1, 1, 0, 0);
SetPlayerCheckpoint(playerid, -2759.3413, -1.0189, 6.9737, 7);
}
case 2:
{
carjacking = CreateVehicle(405, 2352.2668, 1501.5106, 42.8203, 266.7455, 1, 1, 0, 0);
SetPlayerCheckpoint(playerid, 2352.2668, 1501.5106, 42.8203, 7);
}
case 3:
{
carjacking = CreateVehicle(410, 2528.8835, 2536.4658, 21.8750, 265.8289, 1, 1, 0, 0);
SetPlayerCheckpoint(playerid, 2528.8835, 2536.4658, 21.8750, 7);
}
case 4:
{
carjacking = CreateVehicle(412, 2792.0896, -1463.7795, 40.0625, 84.7438, 1, 1, 0, 0);
SetPlayerCheckpoint(playerid, 2792.0896, -1463.7795, 40.0625, 7);
}
}
carsjacking = true;
SendClientMessage(playerid, -1, "Вы начали автоугон, координаты машины были указаны на радаре");
}