help me
#1

how to create a pickup with command in interior?
Reply
#2

/save <pickup name> in game

then

pawn Код:
//at top
new pickup;

//OnFilterScriptInIt or GameModeInIt
pickup = CreatePickup(model,type,Float:x,Float:y,Float:z);

//OnPlayerPickupPickup
if(pickupid == pickup)
{
         SendClientMessage(playerid, COLOR, "Type /enter to enter");
}

//OnPlayerCommandText
if(strcmp(cmdtext,"/enter",true) == 0)
{
         if(IsPlayerInRangeOfPoint(playerid,Float:range,Float:x,Float:y,Float:z)) // basically just take the range and put 7 and the Float:x,y,z just put the coordinates from the pickup creation
         {
                  SetPlayerPos(playerid,Float:x,Float:y,Float:z); // get the coordinates where u want them to enter to and replace the floats with them
                  SetPlayerInterior(playerid, interiorid); //Get the interiorid too
          }
          else
          {
                   SendClientMessage(playerid, COLOR, "You are not close enough to the door");
          }
          return 1;
}
believe thats right ^
Reply
#3

thanks man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)