new CP_Banco; OnGameModeInit: CP_Banco = CreateDynamicCP(1451.1372, -1714.8558, 14.0469, 1.5, -1, -1, -1, 50.0);//Sгo 20 CheckPoints... public OnPlayerEnterDynamicCP(playerid, checkpointid) if(checkpointid == CP_Banco) { SendClientMessage(playerid, 0x6B6A67FF,"~ "); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); return 1; }
new CP_Banco[20];
public OnGamemodeInit();
{
CP_Banco[0] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[1] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[2] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[3] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[4] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[5] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[6] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[7] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[8] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[9] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[10] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[11] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[12] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[13] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[14] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[15] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[16] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[17] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[18] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
CP_Banco[19] = CreateDynamicCP(X, Y, Z, 1.5, -1, -1, -1, 50.0);
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
for(new i; i < CP_Banco; ++i)
{
if(checkpointid == CP_Banco[i])
{
SendClientMessage(playerid, 0x6B6A67FF,"~ ");
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0);
}
return 1;
}
for(new i; i < CP_Banco; ++i) { if(checkpointid == CP_Banco[i]) { SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); SendClientMessage(playerid, 0xFFFFFF00,"» Bem Vindo(a) ao Banco."); SendClientMessage(playerid, 0xFFFFFF00,"» /depositar [quantia]: Deposita а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /sacar [quantia]: Saca а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /saldo: Para ver o saldo atual em sua conta bancaria."); SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); return 1; } }
for(new i; i < CP_Banco[20]; i++) { if(checkpointid == CP_Banco[i]) { SendClientMessage(playerid, 0x6B6A67FF,"~ "); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); } }
for(new i; i < CP_Banco[20]; i++) { if(checkpointid == CP_Banco[i]) { SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); SendClientMessage(playerid, 0xFFFFFF00,"» Bem Vindo(a) ao Banco."); SendClientMessage(playerid, 0xFFFFFF00,"» /depositar [quantia]: Deposita а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /sacar [quantia]: Saca а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /saldo: Para ver o saldo atual em sua conta bancaria."); SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); } }
O Erro Persistiu o que poderia ser?
error 032: array index out of bounds (variable "CP_Banco") Код:
for(new i; i < CP_Banco[20]; i++) { if(checkpointid == CP_Banco[i]) { SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); SendClientMessage(playerid, 0xFFFFFF00,"» Bem Vindo(a) ao Banco."); SendClientMessage(playerid, 0xFFFFFF00,"» /depositar [quantia]: Deposita а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /sacar [quantia]: Saca а quantia desejada."); SendClientMessage(playerid, 0xFFFFFF00,"» /saldo: Para ver o saldo atual em sua conta bancaria."); SendClientMessage(playerid, 0x6B6A67FF,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Banco ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 10.0); } } |
for(new i; i < sizeof(CP_Banco); i++)