01.11.2009, 21:13
i've been trying to get this code to work for hours now. i have a /enter and /exit command with the addstaticpickup when i use /enter it works, but /exit seems to be mixed up, i can enter the B'dup interior and exit it same thing with the ballas interior, but when i enter cluckin i can't exit it here is the code.
also for the OnPlayerPickup it wont show the gametext, and it wont show the addstaticpickup
AddStaticPickup for cluckin
OnPlayerPickup, idk if i have the mixed up or what. i can't see the gametext for cluckin exit
Код:
if (strcmp("/enter", cmdtext, true, 10) == 0) { if(PlayerToPoint(15.0, playerid, 2352.0007,-1168.8942,27.9879))//crack den { SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106);//B'Dup interior SetPlayerInterior(playerid, 3); return 1; } else if(PlayerToPoint(3.0, playerid, 2231.7825,-1159.7080,25.8906))//ballas hq { SetPlayerPos(playerid,318.564971,1118.209960,1083.882812);//Ballas interior SetPlayerInterior(playerid, 5); return 1; } else if(PlayerToPoint(15.0, playerid, 927.0858,-1352.7571,13.3766))//food cluckin2 { SetPlayerPos(playerid, -25.132598,-139.066986,1003.546875); //24'7 4 interior SetPlayerInterior(playerid, 16); return 1; } return 1; } if (strcmp("/exit", cmdtext, true, 10) == 0) { if(PlayerToPoint(15.0, playerid, 1527.229980,-11.574499,1002.097106))//crack den { SetPlayerPos(playerid,2352.0007,-1168.8942,27.9879);//B'Dup interior SetPlayerInterior(playerid, 0); return 1; } else if(PlayerToPoint(15.0, playerid, 318.564971,1118.209960,1083.882812))//ballas hq exit { SetPlayerPos(playerid,2231.7825,-1159.7080,25.8906);//Ballas interior SetPlayerInterior(playerid, 0); return 1; } else if(PlayerToPoint(15.0, playerid, -25.132598,-139.066986,1003.546875))// food cluckin2 exit { SetPlayerPos(playerid,2231.7825,-1159.7080,25.8906);//Lanchonete Rusty browns donuts SetPlayerInterior(playerid, 0); return 1; } return 1; }
AddStaticPickup for cluckin
Код:
AddStaticPickup(1272,23,2231.7825,-1159.7080,25.8906);
OnPlayerPickup, idk if i have the mixed up or what. i can't see the gametext for cluckin exit
Код:
if(PlayerToPoint(15.0, playerid, 2352.0007,-1168.8942,27.9879)) { GameTextForPlayer(playerid, "~r~/enter~w~ to enter the crack house", 5000, 3); return 1; } if(PlayerToPoint(15.0, playerid, 1527.229980,-11.574499,1002.097106)) { GameTextForPlayer(playerid, "~r~/exit~w~ to exit the crack house", 5000, 3); return 1; } if(PlayerToPoint(3.0, playerid, 2231.7825,-1159.7080,25.8906)) { GameTextForPlayer(playerid, "~r~/enter~w~ to enter ballas hq", 5000, 3); return 1; } if(PlayerToPoint(15.0, playerid, 318.564971,1118.209960,1083.882812)) { GameTextForPlayer(playerid, "~r~/exit~w~ to exit ballas hq", 5000, 3); return 1; } if(PlayerToPoint(15.0, playerid, 927.0858,-1352.7571,13.3766)) { GameTextForPlayer(playerid, "~r~/enter~w~ to enter the food place", 5000, 3); return 1; } if(PlayerToPoint(15.0, playerid, -25.132598,-139.066986,1003.546875)) // CLUCKIN EXIT { GameTextForPlayer(playerid, "~r~/exit~w~ to exit the food place", 5000, 3); // CLUCKIN EXIT return 1; }