CMD:arrestpoint(playerid, params[]) { if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty."); GetPlayerPos(playerid, ap[0], ap[1], ap[2]); DestroyDynamic3DTextLabel(apt); DestroyPickup(apt2); apt = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12); apt2 = CreatePickup(1314, 1, ap[0], ap[1], ap[2]); SendClientMessage(playerid, COLOR_WHITE, " You have changed the NYPD's arrest point."); return 1; }
DestroyDynamic3DTextLabel(apt);
DestroyPickup(apt2);
apt = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12);
apt2 = CreatePickup(1314, 1, ap[0], ap[1], ap[2]);
DestroyDynamic3DTextLabel(apt);
DestroyPickup(apt2);
#define MAX_ARREST_POINTS 30 // Defining maximum arrest points.
new ArrestPoints[1][MAX_ARREST_POINTS]; // Creating our variable to store IDs, in case of you need to delete them.
new ArrestPointCount; // To keep how many arrest points have been created.
CMD:arrestpoint(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
if(ArrestPointCount == MAX_ARREST_POINTS) return SendClientMessage(playerid, COLOR_GREY, "Arrest point limit has been filled!");
GetPlayerPos(playerid, ap[0], ap[1], ap[2]);
ArrestPoints[0][ArrestPointCount] = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12);
ArrestPoints[1][ArrestPointCount] = CreatePickup(1314, 1, ap[0], ap[1], ap[2]);
SendClientMessage(playerid, COLOR_WHITE, " You have changed the NYPD's arrest point.");
ArrestPointCount++;
return 1;
}
Lemme try, thanks before
___________________________________ warning 203: symbol is never used: "ArrestPointCount" warning 203: symbol is never used: "ArrestPoints" warning 204: symbol is assigned a value that is never used: "apt" warning 204: symbol is assigned a value that is never used: "apt2" 4 warns, how to fix that? |
new ArrestPointCount;
new ArrestPointCount = 0;
apt = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12); apt2 = CreatePickup(1314, 1, ap[0], ap[1], ap[2]);
I have to delete this?
Код:
apt = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12); apt2 = CreatePickup(1314, 1, ap[0], ap[1], ap[2]); |
warning 213: tag mismatch
error 032: array index out of bounds (variable "ArrestPoints") warning 204: symbol is assigned a value that is never used: "apt" warning 204: symbol is assigned a value that is never used: "apt2" I used your scripts |
#define MAX_ARREST_POINTS 30 // Defining maximum arrest points.
new ArrestPoints[MAX_ARREST_POINTS]; // Creating our variable to store IDs, in case of you need to delete them.
new Text3D:ArrestPointText[MAX_ARREST_POINTS];
new ArrestPointCount; // To keep how many arrest points have been created.
CMD:arrestpoint(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
if(ArrestPointCount == MAX_ARREST_POINTS) return SendClientMessage(playerid, COLOR_GREY, "Arrest point limit has been filled!");
GetPlayerPos(playerid, ap[0], ap[1], ap[2]);
ArrestPointText[ArrestPointCount] = CreateDynamic3DTextLabel("Arrest Point\n{FFFF00}/arrest to arrest a suspect", COLOR_RED, ap[0], ap[1], ap[2], 12);
ArrestPoints[ArrestPointCount] = CreatePickup(1314, 1, ap[0], ap[1], ap[2]);
SendClientMessage(playerid, COLOR_WHITE, " You have changed the NYPD's arrest point.");
ArrestPointCount++;
return 1;
}