SA-MP Forums Archive
Admin Door - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Admin Door (/showthread.php?tid=82123)



Admin Door - Emrets61 - 16.06.2009

I'm created admin door. "/kapiac" is opening admin door command. But my commands is wrong. I dont know wrongs. Help me.

[code=Command]
if (strcmp(cmdtext, "/kapiac", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendPlayerFormattedText(playerid, "Sadece adminler kapiyi acabilir.", 0);
}
. else
.. {
... if(AttachObjectToPlayer(adminkapi,playerid,1.5, 0.5, 0, 0, 1.5, 2)
1853: {
... MoveObject(adminkapi, 1256.65, -766.82, 92.75, ;
.. }
. else
{
PlayerPlaySound(playerid, 1035, 0.0, 0.0, 0.0);
MoveObject(adminkapi, 1256.65, -766.82, 92.75, ;
}
}
return 1;
}
[/code]

[code=Wrong]
(1853) : error 001: expected token: ")", but found "{"
[/code]


Re: Admin Door - bogeymanEST - 16.06.2009

pawn Код:
if (strcmp(cmdtext, "/kapiac", true) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SendPlayerFormattedText(playerid, "Sadece adminler kapiyi acabilir.", 0);
        }
        else
        {
            if(AttachObjectToPlayer(adminkapi,playerid,1.5, 0.5, 0, 0, 1.5, 2)) //You were missing a ')'
            {
                MoveObject(adminkapi, 1256.65, -766.82, 92.75, 8);
            }
            else
            {
                PlayerPlaySound(playerid, 1035, 0.0, 0.0, 0.0);
                MoveObject(adminkapi, 1256.65, -766.82, 92.75, 8);
            }
        }
        return 1;
    }



Re: Admin Door - Emrets61 - 16.06.2009

I havent looked. Thank you.