[FS]Admin Island Project!!!!Need Small help!
#6

pawn Код:
#include <a_samp>
new AdminGate;

public OnFilterScriptInit()
{
AdminGate = CreateObject(ID, WHERE IS THE LIFT?);
}


public OnFilterScriptExit()
{

}


public OnPlayerConnect(playerid)
{
return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}


public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{

if(strcmp(cmdtext,"/liftup", true) == 0) {
    if(IsPlayerAdmin(playerid)) {
        if(IsPlayerInRangeOfPoint(playerid, RANGE.0, CO-ORDS WHERE THE LIFT IS WHEN DOWN)) {
            MoveObject (AdminGate, CO-ORDS WHERE LIFT SHOULD GO, SPEED);
        } else {
            return SendClientMessage(playerid,0xFFFFFF,"You aren't in range!");
        }
    } else {
        return SendClientMessage(playerid,0xFFFFFF,"This command is only avaible for RCON Administrators.");
    }
    return 1;
}

if(strcmp(cmdtext,"/liftdown", true) == 0) {
    if(IsPlayerAdmin(playerid)) {
        if(IsPlayerInRangeOfPoint(playerid, RANGE.0, CO-ORDS WHERE THE LIFT IS WHEN ITS UP)) {
            MoveObject (AdminGate, CO-ORDS WHERE THE LIFT IS DOWN, SPEED);
        } else {
            return SendClientMessage(playerid,0xFFFFFF,"You aren't in range!");
        }
    } else {
        return SendClientMessage(playerid,0xFFFFFF,"This command is only avaible for RCON Administrators.");
    }
    return 1;
}
return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)