21.06.2016, 15:53
(
Последний раз редактировалось Johnny_Ionut; 21.06.2016 в 19:31.
Причина: error 032: array index out of bounds"
)
Hello everyone!
When i compile this command result this error
"error 032: array index out of bounds". Problem it's SAPDVehicles
What can i do ?
This is script
Please help me, thanks.
When i compile this command result this error
"error 032: array index out of bounds". Problem it's SAPDVehicles
What can i do ?
This is script
pawn Код:
new SAPDVehicles[20];
zcmd(fvr, playerid, params[])
{
if(!IsPlayerConnectedEx(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, NoConectado);
{
{
if(Info[playerid][pLeader] > 0)
{
switch(Info[playerid][pLeader])
{
case 1:
{
{
new bool:unwanted[MAX_VEHICLES];
foreach(Player, player)
{
if(IsPlayerInAnyVehicle(player))
{
unwanted[GetPlayerVehicleID(player)]=true;
}
}
for(new car = SAPDVehicles[0]; car <= SAPDVehicles[52]; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
}
}
SendFamilyMessage(Info[playerid][pMember], 0xFE6C01FF, " All cars unused has been respawned by {FFFFFF}Leader");
}
else return SendClientMessageEx(playerid, COLOR_GREY, "You're not Leader!");
}
}
return 1;
}