18.07.2013, 08:52
pawn Код:
CMD:createatm(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) {
return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You are not authorised to use that command");
}
new
id = getNextAvailableATMID();
GetPlayerPos(playerid, AtmInfo[id][atmX], AtmInfo[id][atmY], AtmInfo[id][atmZ]);
GetPlayerFacingAngle(playerid, AtmInfo[id][atmAngle]);
GetXYInFrontOfPlayer(playerid, AtmInfo[id][atmX], AtmInfo[id][atmY], 2.0);
AtmInfo[id][atmTaken] = 1;
AtmInfo[id][atmInterior] = GetPlayerInterior(playerid);
AtmInfo[id][atmVirtualWorld] = GetPlayerVirtualWorld(playerid);
AtmInfo[id][atmAngle] += 90;
SendClientMessage(playerid, 0xFFFF00FF, "You have created an ATM.");
CreateDynamicATM(id);
return 1;
}