15.12.2012, 05:43
Well, i wonder how to ex. make a enter able house? /enter /exit ?
#include <streamer>
new Houseone;
new rddytoenter[MAX_PLAYERS];
public OnGameModeInit()
{
Houseone = CreateDynamicCP(X, Y, Z, CP Size);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == Houseone)
{
rddytoenter[playerid]=1;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(rddytoenter[playerid]==1)
{
SetPlayerInterior(playerid, intid);
SendClientMessage(playerid, 0x00A4F6AA, "You Have Entered The House.");
return 1;
}
else SendClientMessage(playerid, 0xF60000AA, "You Aren't At The Home CheckPoint To Enter...");
return 0;
}
}