y_ini Save Exit House pos player
#1

Hello ^_^
i need some help about this cuz i dont have any idea how to make it
i made new house system i want some help Exit CP
how to make the house > Save player float exit ? cuz i dont know
i want make when i exit from house to last pos cuz i dont know how to make it
and saving in text the pos player when leave from house with y_ini
thanks ^_^
My Code
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#include <sscanf2>
#include <YSI\y_ini>
new house1Enthouse1Exit;
new 
house2Enthouse2Exit;
CMD:createhouse(playeridparams[])
{
    new 
interiortype[16];
    new 
Float:xFloat:yFloat:z;
    if(
sscanf(params"is[16]"interiortype))
    if(
interior 7SendClientMessage(playerid, -1"Invaild Interior ID");
    
GetPlayerPos(playeridxyz);
    if(!
strcmp(type"enter"true))
    {
        if(
interior == 1)
        {
            
house1Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        else if(
interior == 2)
        {
            
house2Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
    }
    if(!
strcmp(type"exit"true))
    {
        if(
interior == 1)
        {
            
house1Exit CreateDynamicCP(234.1368,1063.7231,1084.2123,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 2)
        {
            
house2Exit CreateDynamicCP(225.7605,1021.4443,1084.0177,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
    }
    return 
1;
}
public 
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == house1Ent)
    {
        
SetPlayerInterior(playerid,6);
        
SetPlayerPos(playerid,234.1586,1066.9490,1084.2075);
    }
    else if(
checkpointid == house2Ent)
    {
        
SetPlayerInterior(playerid,7);
        
SetPlayerPos(playerid,225.8389,1025.0447,1084.0078);
    }
    else if(
checkpointid == house1Exit)
    {
        
SetPlayerPos(playerid,272.884979,306.631988,999.148437);
    }
    else if(
checkpointid == house2Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    return 
1;

Reply
#2

Bump!
Reply
#3

Bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)