11.04.2011, 02:53
On the top of the script:
OnGameModeInit:
OnPlayerPickupPickup:
pawn Код:
new
//Removed the rest of the new's to save post-space..
PickupTimer1[MAX_PLAYERS],
PickupTimer2[MAX_PLAYERS],
PickupTimer3[MAX_PLAYERS],
THCDE,
THCM4,
THCSPA
//THCAR
;
pawn Код:
THCDE = AddStaticPickup(348, 3, 1406.7626,6.7967,1000.9209, 0);
THCSPA = AddStaticPickup(351, 3, 1403.6320,6.8458,1000.9063, 0);
THCM4 = AddStaticPickup(356, 3, 1400.4009,6.8681,1000.9063, 0);
AddStaticPickup(1242, 3, 1389.4666,5.8593,1001.9375, 0); //THCAR
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(IsPlayerInRangeOfPoint(playerid, 1, 2036.493286, -1404.380004, 17.260807)) //This works aswell, but that's about it.
{
GameTextForPlayer(playerid, "~r~/heal", 1000, 1);
}
if(pickupid == THCSPA) { //This is the only one that seems to work.
if(PickupTimer2[playerid] == 0) {
GivePlayerWeapon(playerid, 27, 350);
PickupTimer2[playerid] = 1;
}
}
else if(pickupid == THCM4) {
if(PickupTimer3[playerid] == 0) {
GivePlayerWeapon(playerid, 31, 500);
PickupTimer3[playerid] = 1;
}
}
else if(pickupid == THCDE) {
if(PickupTimer1[playerid] == 0) {
GivePlayerWeapon(playerid, 24, 350);
PickupTimer1[playerid] = 1;
}
}
/*else if(IsPlayerInRangeOfPoint(playerid, 3, 1406.7626,6.7967,1000.9209))
{
if(PickupTimer1[playerid] == 0) {
GivePlayerWeapon(playerid, 24, 350);
PickupTimer1[playerid] = 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1400.4009,6.8681,1000.9063))
{
if(PickupTimer2[playerid] == 0) {
GivePlayerWeapon(playerid, 27, 350);
PickupTimer2[playerid] = 1;
}
}
else if(IsPlayerInRangeOfPoint(playerid, 3, 1403.6320,6.8458,1000.9063))
{
if(PickupTimer3[playerid] == 0) {
GivePlayerWeapon(playerid, 31, 500);
PickupTimer3[playerid] = 1;
}
}*/
return 1;
}