02.06.2013, 13:28
Hello guys.I have made a command /vhouse.When you type it, it teleports you to Madd Dog's Mansion.I have created a checkpoint too, so you can leave the mansion.The problem is that, when I leave the mansion all cars disappear from their spawn position and they spawn at the road (street).
/vhouse command:
At "OnPlayerSpawn", I have this:
and at "OnPlayerEnterCheckPoint",I have this:
/vhouse command:
pawn Код:
CMD:vhouse(playerid, params[])
{
new string[128], name[24];
if(PlayerInfo[playerid][pVipLevel] < 3) return SendClientMessage(playerid,0xFF0000AA, "You must be Platinum VIP to use this command");
if(PlayerInfo[playerid][pVipLevel] == 1) { vrank = "Silver VIP"; }
else if(PlayerInfo[playerid][pVipLevel] == 2) { vrank = "Gold VIP"; }
else if(PlayerInfo[playerid][pVipLevel] == 3) { vrank = "Platinum VIP"; }
SetPlayerPos(playerid, 1270.0016,-777.6048,1091.9063);
SetPlayerInterior(playerid, 5);
RemovePlayerFromVehicle(playerid);
GameTextForPlayer(playerid, "~g~Welcome To VIP House", 5000, 6);
SendClientMessage(playerid, -1, "Welcome to VIP House");
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s %s has teleported to VIP House", vrank, name);
SendToVip(0x32CD32AA, string);
return 1;
}
pawn Код:
SetPlayerCheckpoint(playerid,1261.1808,-785.3730,1091.9063,4);
pawn Код:
SetPlayerPos(playerid, 1258.6992,-785.3705,92.0302);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);