21.01.2015, 02:34
Hello Guys
i Want Know About Exit House DynamicCP
i Want Make the exit in my system
can somone help me +rep please help
CP Exit in house1 =
CP Exit in house2 =
help +repss
i Want Know About Exit House DynamicCP
i Want Make the exit in my system
can somone help me +rep please help
PHP код:
#include <a_samp>
#include <Streamer>
#include <zcmd>
#include <sscanf2>
new house1;
new house2;
CMD:createhouse(playerid, params[])
{
new interior;
if(sscanf(params,"i", interior)) return SendClientMessage(playerid, -1, "/createhouse [1~2]");
if(interior == 1)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
house1 = CreateDynamicCP( x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
else if(interior == 2)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
house2 = CreateDynamicCP(x,y,z,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
}
else
{
SendClientMessage(playerid, -1, "Invaild Interior ID");
}
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid){
if(checkpointid == house1)
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,271.884979,306.631988,999.148437);
}
else if(checkpointid == house2)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106 );
}
return 1;}
PHP код:
272.884979,306.631988,999.148437
PHP код:
1526.229980,-11.574499,1002.097106