Hi
Olyan kérdésem lenne hogyha leteszek mondjuk 20 ugyanolyan id-jû házinterriort, akkor azt hogy oldom meg hogy oda is dobjon ki ahova belépek?
Most ilyen scriptem van:
if(strcmp(cmdtext, \"/enter\", true) == 0) {
if (IsPlayerInRangeOfPoint(playerid, 3.0, 938.4868, -3062.6702, 1.9959))
{
SetPlayerPos(playerid, 1527.229980,-11.574499,1002.097106);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, 863.0538, -3013.7795, 2.0271))
{
SetPlayerPos(playerid, 1527.229980,-11.574499,1002.097106);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 2);
}
// ÉS még tovább jópár
if(strcmp(cmdtext, \"/exit\", true) == 0) {
if (IsPlayerInRangeOfPoint(playerid, 3.0, 1527.229980,-11.574499,1002.097106))
{
SetPlayerPos(playerid, 938.4868, -3062.6702, 1.9959);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
else if (IsPlayerInRangeOfPoint(playerid, 3.0, 1527.229980,-11.574499,1002.097106))
{
SetPlayerPos(playerid, 863.0538, -3013.7795, 2.0271);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
//ittis még jópár
A másik gond az onplayerpickuppickup
Megcsináltam X mennyiségû pickupot de seholse irja ki amit kéne:
//PICKUPS
pickup1 = AddStaticPickup(1239, 15, 938.4868, -3062.6702, 1.9959); // pickup
pickup2 = AddStaticPickup(1239, 15, 863.0538, -3013.7795, 2.0271); // pickup
pickup3 = AddStaticPickup(1239, 15, 863.5004, -3057.0232, 2.0521); // pickup
//OnPlayerPickupPickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup1) GameTextForPlayer(playerid, \"~g~/enter\", 3000, 5);
else if(pickupid == pickup2) GameTextForPlayer(playerid, \"~g~/enter\", 3000, 5);
else if(pickupid == pickup3) GameTextForPlayer(playerid, \"~g~/enter\", 3000, 5);
return 1;
}