[HELP]How to make /enter /exit with zcmd
#3

PHP код:
CMD:enter(playerid,params[])
{
    
// First line: We are checking if here IS NOT near the entrance and if we confirm that we return him message.
    
if(!IsPlayerInRangeOfPoint(playerid,4.0,2522.8105,-1679.3905,15.4970)) return SendClientMessage(playerid,-1,"ERROR: You are not near the entrance");
    else 
// else if he is near the entrance...
    
{
        
SetPlayerPos(playerid,2527.654052,-1679.388305,1015.498596); // Setting position..
        
SetPlayerInterior(playerid,1); // ... And interior. DONE!
    
}
    return 
1;
}
CMD:exit(playerid,params[])
{
    
// Here we have done the same thing just changed the coordinates.
    
if(!IsPlayerInRangeOfPoint(playerid,4.0,2527.654052,-1679.388305,1015.498596)) return SendClientMessage(playerid,-1,"ERROR: You are not near the exit");
    else
    {
        
SetPlayerPos(playerid,2522.8105,-1679.3905,15.4970);
        
SetPlayerInterior(playerid,0);
    }
    return 
1;

Reply


Messages In This Thread
[HELP]How to make /enter /exit with zcmd - by JBee - 13.06.2015, 03:16
Re: [HELP]How to make /enter /exit with zcmd - by DarkLouis - 13.06.2015, 06:46
Re: [HELP]How to make /enter /exit with zcmd - by NoDi522 - 13.06.2015, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)