/opengate automatich close gate
#1

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;
}
Reply
#2

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

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

Take a look at tutorial in my siggy.
Reply
#5

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

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
Reply
#7

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

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;
}
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)