Little question about 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little question about gate (
/showthread.php?tid=88608)
Little question about gate -
EdjKa - 27.07.2009
Hello, i have this peace of code
Код:
if(!strcmp(cmdtext, "/gateopen", true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 3)
{
if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960))
{
MoveObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
SetTimer("GateClose", 12000, 0);
SendClientMessage(playerid, COLOR_BLUE," Āīљīņą ēąźљīћņń˙ чељеē 7 ńеźуķд.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s īņźљūė āīљīņą.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960);
I want to use the horn button, and not write - /gateopen, what should i change?
Re: Little question about gate -
MadeMan - 27.07.2009
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == KEY_SPRINT)
{
//Add your code here
}
}
Re: Little question about gate -
cyber_punk - 27.07.2009
Huh I thought the horn key could not be used, similar to CONVERSATION_NO/CONVERSATION_YES (N/Y keys).
Re: Little question about gate -
MadeMan - 27.07.2009
Yeah, that key might not be right, but just an example how to use keys.