Open only faction
#1

hy, how do i make, the only faction , example 14 , faction nummber 14 can open the gate ?
please make in this script that, only faction nummber 14 can open the gate

PHP код:
/*
Credits goes to:
[SAP]Sidhu, for his awesome idea and programming!
[SAP]Sidhu Made this
    DO NOT REMOVE THE STUFF ABOVE, ANY ATTEMP TO DO SO WILL RESULT IN YOU PAYING THE CONSEQUENCES IF CAUGHT
*/
//===============================Include Files==================================
#include <a_samp>
#define FILTERSCRIPT
#define GREY 0xc8bebeAA
#define COLOR_GREY 0xc8bebeAA
#define COLOR_LIME 0x99FF00AA
#define COLOR_RED 0xAA3333AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GRAD1 0xB4B5B7AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#pragma tabsize 0
new gate;
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnPlayerConnect(playerid)
{
    
SendClientMessage(playeridCOLOR_YELLOW"");
    
SendClientMessage(playeridCOLOR_YELLOW"");
    return 
1;
}
public 
OnFilterScriptInit()
{
    
AddStaticPickup(131821122.5795898438,-2037.013671875,69.892913818359); // HQ icon
    
Create3DTextLabel("Grove street gang",0xFF9F40FF,1122.5795898438,-2037.013671875,69.892913818359+0.75,20.0,0,1);
    
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Gates");
    print(
"----------------------------------\n");
}
#endif
public OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
gate CreateObject(2933,2473.78808594,-1691.76757812,14.23004055,0.00000000,0.00000000,180.00000000);// gate
    
    
return 1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid2473.8220214844, -1690.803588867215.244583129883);
    
SetPlayerCameraPos(playerid2473.8220214844, -1690.803588867215.244583129883);
    
SetPlayerCameraLookAt(playerid2473.8220214844, -1690.803588867215.244583129883);
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp(cmdtext"/groveo"true)==0// Command
       
{
      
MoveObject (gate,2478.1059570313,-1695.9339599609,14.231301307678,2); // Gate (open)
      
SendClientMessage(playeridCOLOR_GREEN"Gate is open!");
      return 
1;
       }
    if (
strcmp(cmdtext"/grovec"true)==0)
       {
   
MoveObject (gate,2473.78808594,-1691.76757812,14.23004055,2); // Gate (close)
   
SendClientMessage(playeridCOLOR_RED"Gate is close!");
   return 
1;
       }
    if(!
strcmp(cmdtext"/grove"true)) // commands
    
{
        
SendClientMessage(playeridCOLOR_YELLOW"/groveo - open");
        
SendClientMessage(playeridCOLOR_YELLOW"/grovec - close");
        return 
1;
       }
    return 
0;

Reply


Messages In This Thread
Open only faction - by Donn1 - 04.03.2011, 14:48
Re: Open only faction - by antonio112 - 04.03.2011, 15:22
Re: Open only faction - by THE_KNOWN - 04.03.2011, 16:05
Re: Open only faction - by Donn1 - 04.03.2011, 16:34
Re: Open only faction - by Donn1 - 04.03.2011, 17:07
Re: Open only faction - by Riddick94 - 04.03.2011, 17:11
Re: Open only faction - by Donn1 - 04.03.2011, 17:48
Re: Open only faction - by Donn1 - 04.03.2011, 18:35
Re: Open only faction - by Mean - 04.03.2011, 21:24
Re: Open only faction - by Marricio - 04.03.2011, 21:28

Forum Jump:


Users browsing this thread: 2 Guest(s)