28.07.2010, 22:38
how to create a pickup with command in interior?
//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;
}