Killing a Checkpoint -
xXRealLegitXx - 17.02.2013
So, I tried this:
Код:
CMD:killcheckpoint(playerid, params[])
{
DisablePlayerCheckpoint(playerid);
return 1;
}
to kill a checkpoint, but that doesn't work. I wan't it to kill those checkpoints that are about a 2x2 red square on the map. NOT the san andreas checkpoints you make on the map with right click
If anyone could do this, I would appreciate it.
Re: Killing a Checkpoint -
reckst4r - 17.02.2013
Why are you using params[] when there are no params?
pawn Код:
CMD:killcheckpoint(playerid)
{
DisablePlayerCheckpoint(playerid);
return 1;
}
Re: Killing a Checkpoint -
xXRealLegitXx - 17.02.2013
Quote:
Originally Posted by reckst4r
Why are you using params[] when there are no params?
pawn Код:
CMD:killcheckpoint(playerid) { DisablePlayerCheckpoint(playerid); return 1; }
|
When I do /killcheckpoint, it goes away for a second then comes back.
I am a C++ noob.
Re: Killing a Checkpoint -
Scenario - 17.02.2013
@OP: You're talking about map-icons, then. Try this:
RemovePlayerMapIcon
@reckst4r: It doesn't matter if you don't use it. However, you can always add this, if you don't: #pragma unused params
Re: Killing a Checkpoint -
xXRealLegitXx - 17.02.2013
Quote:
Originally Posted by RealCop228
@OP: You're talking about map-icons, then. Try this: RemovePlayerMapIcon
@reckst4r: It doesn't matter if you don't use it. However, you can always add this, if you don't: #pragma unused params
|
I am talking about these:
I want /killcheckpoint to get rid of it.
Re: Killing a Checkpoint -
Scenario - 17.02.2013
Right. If DisablePlayerCheckpoint isn't working, try the function I gave you. It is ALSO capable of adding these little blimps on the map.
Re: Killing a Checkpoint -
xXRealLegitXx - 17.02.2013
Quote:
Originally Posted by RealCop228
Right. If DisablePlayerCheckpoint isn't working, try the function I gave you. It is ALSO capable of adding these little blimps on the map.
|
Didn't work, I am doing /callcar with the Advanced Vehicle System filterscript, maybe that is why.
I used
Код:
CMD:killcheckpoint(playerid)
{
RemovePlayerMapIcon( playerid, 0 );
SendClientMessage(playerid, COLOR_YELLOW, "You have terminated your checkpoint");
return 1;
}
Re: Killing a Checkpoint -
Scenario - 17.02.2013
Show the function that is making that blimp.
Re: Killing a Checkpoint -
[ABK]Antonio - 17.02.2013
Quote:
Originally Posted by reckst4r
Why are you using params[] when there are no params?
pawn Код:
CMD:killcheckpoint(playerid) { DisablePlayerCheckpoint(playerid); return 1; }
|
Completely irrelevant to the topic.. I wouldn't care if you at least said something like "YO THIS IS THE PROBLEM" even if it was wrong. Adding params[] wouldn't make much of a difference in the actual performance (not speed) of the command.
Quote:
Originally Posted by xXRealLegitXx
When I do /killcheckpoint, it goes away for a second then comes back.
I am a C++ noob.
|
Check when it's created if it sets a timer that creates the checkpoint again. If it goes away, then it's probably being disabled but then set again.
Re: Killing a Checkpoint -
xXRealLegitXx - 17.02.2013
Quote:
Originally Posted by [ABK]Antonio
Completely irrelevant to the topic.. I wouldn't care if you at least said something like "YO THIS IS THE PROBLEM" even if it was wrong. Adding params[] wouldn't make much of a difference in the actual performance (not speed) of the command.
Check when it's created if it sets a timer that creates the checkpoint again. If it goes away, then it's probably being disabled but then set again.
|
I was looking in the AVS filter script and this is the command for /callcar (which created the checkpoint)
Код:
CMD:callcar(playerid, params[])
{
if(TrackCar[playerid])
{
TrackCar[playerid] = 0;
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You are not tracking your vehicle anymore");
return 1;
}
new playername[24];
GetPlayerName(playerid, playername, sizeof(playername));
new info[256], bool:found;
for(new i=1; i < MAX_DVEHICLES; i++)
{
if(VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], playername) == 0)
{
found = true;
format(info, sizeof(info), "%sID: %d Name: %s\n", info, i, VehicleNames[VehicleModel[i]-400]);
}
}
if(!found) return SendClientMessage(playerid, COLOR_RED, "You don't have any vehicles!");
ShowPlayerDialog(playerid, DIALOG_FINDVEHICLE, DIALOG_STYLE_LIST, "Find Your Vehicle", info, "Find", "Cancel");
return 1;
}
I know it has its own kill checkpoint system, but I want this command to be created to kill every checkpoint, as in the future more commands will add checkpoints.