SA-MP Forums Archive
/opengate automatich close gate - 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)
+--- Thread: /opengate automatich close gate (/showthread.php?tid=283165)



/opengate automatich close gate - hydronic - 13.09.2011

i want to make gate with automacit closee gate please help

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Open", cmdtext, true, 10) == 0)
{
	    MoveObject(gate, 831.0235, -1888.9404, 5.9893, 7);
return 1;
}
if (strcmp("/ohouse", cmdtext, true,10) == 0)
{
SetPlayerPos(playerid,837.1106, -1875.3643, 13.4764);
return 1;
}
if (strcmp("/close", cmdtext, true, 10) == 0)
{
MoveObject(gate,831.0235, -1888.9404, 10.8938,7);
return 1;
		}
	return 0;
}



Re: /opengate automatich close gate - Kingunit - 13.09.2011

PAWN tags please [.pawn] [./pawn] (Remove those dots)


Re: /opengate automatich close gate - hydronic - 13.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
PAWN tags please [.pawn] [./pawn] (Remove those dots)
now i change to code


Re: /opengate automatich close gate - =WoR=Varth - 13.09.2011

Take a look at tutorial in my siggy.


Re: /opengate automatich close gate - hydronic - 13.09.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Take a look at tutorial in my siggy.
can you give me link please


Re: /opengate automatich close gate - =WoR=Varth - 13.09.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
Take a look at tutorial in my siggy.
Quote:
Originally Posted by hydronic
Посмотреть сообщение
can you give me link please
https://sampforum.blast.hk/showthread.php?tid=278880


Re: /opengate automatich close gate - hydronic - 13.09.2011

Quote:
Originally Posted by varthshenon
Посмотреть сообщение
thanks very much


Re: /opengate automatich close gate - Kingunit - 13.09.2011

By the way - learn using tabs. Your code looks shitty f ex:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //-----[Open]-----
    if (strcmp("/Open", cmdtext, true, 10) == 0)
    {
        MoveObject(gate, 831.0235, -1888.9404, 5.9893, 7);
        return 1;
    }
   
    //-----[Ohouse]-----
    if (strcmp("/ohouse", cmdtext, true,10) == 0)
    {
        SetPlayerPos(playerid,837.1106, -1875.3643, 13.4764);
        return 1;
    }
   
    //-----[Close]-----
    if (strcmp("/close", cmdtext, true, 10) == 0)
    {
        MoveObject(gate,831.0235, -1888.9404, 10.8938,7);
        return 1;
    }
   
return 0;
}



Re: /opengate automatich close gate - hydronic - 14.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
By the way - learn using tabs. Your code looks shitty f ex:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //-----[Open]-----
    if (strcmp("/Open", cmdtext, true, 10) == 0)
    {
        MoveObject(gate, 831.0235, -1888.9404, 5.9893, 7);
        return 1;
    }
   
    //-----[Ohouse]-----
    if (strcmp("/ohouse", cmdtext, true,10) == 0)
    {
        SetPlayerPos(playerid,837.1106, -1875.3643, 13.4764);
        return 1;
    }
   
    //-----[Close]-----
    if (strcmp("/close", cmdtext, true, 10) == 0)
    {
        MoveObject(gate,831.0235, -1888.9404, 10.8938,7);
        return 1;
    }
   
return 0;
}

i need auto close