How to make a moveable gate with a rang?
#3

first at the top of script
pawn Код:
// at OnGameModeInt
new gate = CreateObject(modelID, X, Y, Z, X rotation, Y rotation, Z rotation, DrawDistance); // you may use samp map editor or if mta map editor, use http://www.convertffs.com to convert an object from mta to samp..
then as example cmd
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
 {

                      if(!strcmp(cmdtext, "/gate", true))
                      {
                             if(IsPlayerInRangeOfPoint(playerid, float:distance, x, y, z)) // check if the player at the place
                              {
                  SetObjectPos(gate, X, Y,Z); // you can get the pos when you create the gate opens
                                }
                               else // if other
                               {
                              SendClientMessage(playerid, RED, "You are not near the gate!");
                               }
                           return 1;

 
                   }
                   return 0;
  }
Reply


Messages In This Thread
How to make a moveable gate with a rang? - by Le3aT - 12.12.2013, 14:25
Re: How to make a moveable gate with a rang? - by mahdi499 - 12.12.2013, 14:33
Re: How to make a moveable gate with a rang? - by Sawalha - 12.12.2013, 18:02

Forum Jump:


Users browsing this thread: 1 Guest(s)