Jump to content

Question

Posted

Salut am si eu o problema am la factiunea TCC eu am garaj cu enter exit car dar masinile daca sunt blocate nu merg bagate in garaj. Eu vreau ca doar membri tcc sa le mearga sa deblocheze masinille si nush cum am un sistem de /unlock poate ma ajutati sal fac sa deblocheze masinile. DOAR TCC

[pawn]if (strcmp(cmdtext, "/unlock", true)==0)

{

if(IsPlayerInAnyVehicle(playerid))

{

new State=GetPlayerState(playerid);

if(State!=PLAYER_STATE_DRIVER)

{

SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver.");

return 1;

}

new i;

for(i=0;i<MAX_PLAYERS;i++)

{

SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);

}

SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");

new Float:pX, Float:pY, Float:pZ;

GetPlayerPos(playerid,pX,pY,pZ);

PlayerPlaySound(playerid,1057,pX,pY,pZ);

locked[playerid][GetPlayerVehicleID(playerid)] = 0;

}[/pawn]

Don't be a FOOL!!

1 answer to this question

Recommended Posts

Posted

Nu ai postat bine , dar uite:

if (strcmp(cmdtext, "/unlock", true)==0)		
        {			
         if(IsPlayerInAnyVehicle(playerid))			
         {	
           if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)	
           {		
              new State=GetPlayerState(playerid);				
              if(State!=PLAYER_STATE_DRIVER)				
             {					
             SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver.");
             return 1;				
             }				
             new i;				
             for(i=0;i<MAX_PLAYERS;i++)				
             {					
                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);			 
             }			
            SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");				new Float:pX, Float:pY, Float:pZ;				
              GetPlayerPos(playerid,pX,pY,pZ);				
             PlayerPlaySound(playerid,1057,pX,pY,pZ);				
            locked[playerid][GetPlayerVehicleID(playerid)] = 0;	
        }		
   }
}

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.