Help Me in [CreateDynamicCP House :D]
#1

Hello Every one
i Want Know How To Make With Choose From 2 House
/createhouse 1 or /createhouse 2
with this pos
PHP код:
1interior 2
1Pos 
271.884979,306.631988,999.148437 
PHP код:
2interior 3
2Pos 
1527.229980,-11.574499,1002.097106 
any one have idea
please help me +rep
Reply
#2

Did you make anything in the command ?
Reply
#3

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
Did you make anything in the command ?
no cuz i dont have any idea to make house
Reply
#4

Bumb
Reply
#5

No One
Reply
#6

pawn Код:
CMD:createhouse(playerid, params[])
{
    if(!sscanf(params,"i",interior)) SendClientMessage(playerid,-1,"Usage: /createhouse [interior]");

    if(interior == 1)
    {
        CreateCP(POS 1);
    }
    else if(interior == 2)
    {
        CreateCP(POS 2);
    }
    return 1;
}
this is a smaill example
Reply
#7

Sorry for late

At the top
PHP код:
new house1;
new 
house2
PHP код:
CMD:createhouse(playeridparams[])
{
new 
interior;
if(
sscanf(params,"i"interior)) return SendClientMessage(playerid, -1"/createhouse [1~2]");
if(
interior == 1)
{
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
house1 CreatePickup(12732x,y,z,GetPlayerVirtualWorld(playerid));
}
else if(
interior == 2)
{
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
house2 CreatePickup(12722x,y,z,GetPlayerVirtualWorld(playerid));
}
else
{
SendClientMesssage(playerid, -1"Invaild Interior ID");
}
return 
1;

Under OnPlayerPickUpPickup
PHP код:
if(pickupid == house1)
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,271.884979,306.631988,999.148437);
}
else if(
pickupid == house2)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106 );

And then you done !
And this is pickup not CP and this is better
Reply
#8

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
Sorry for late

At the top
PHP код:
new house1;
new 
house2
PHP код:
CMD:createhouse(playeridparams[])
{
new 
interior;
if(
sscanf(params,"i"interior)) return SendClientMessage(playerid, -1"/createhouse [1~2]");
if(
interior == 1)
{
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
house1 CreatePickup(12732x,y,z,GetPlayerVirtualWorld(playerid));
}
else if(
interior == 2)
{
new 
Float:xFloat:yFloat:z;
GetPlayerPos(playeridxyz);
house2 CreatePickup(12722x,y,z,GetPlayerVirtualWorld(playerid));
}
else
{
SendClientMesssage(playerid, -1"Invaild Interior ID");
}
return 
1;

Under OnPlayerPickUpPickup
PHP код:
if(pickupid == house1)
{
SetPlayerInterior(playerid,2);
SetPlayerPos(playerid,271.884979,306.631988,999.148437);
}
else if(
pickupid == house2)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106 );

And then you done !
And this is pickup not CP and this is better
i Love CP i will Try it CP
thanks +rep dude
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)