06.06.2012, 18:43
peguei 1 codigo pra so apenas o dono da casa pode andar no carro so q da esse erro:
Codigo:
pawn Код:
C:\Users\gta\Desktop\servidor\gamemodes\gm.pwn(13277) : error 033: array must be indexed (variable "hOwner")
C:\Users\gta\Desktop\servidor\gamemodes\gm.pwn(13279) : error 033: array must be indexed (variable "hOwner")
C:\Users\gta\Desktop\servidor\gamemodes\gm.pwn(13283) : error 033: array must be indexed (variable "hOwner")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
if(newstate == 2)
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
new carrocasa = GetPlayerVehicleID(playerid);
if(carrocasa == HouseInfo[i][hVec])
{
if(HouseInfo[i][hOwned]==0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Esse carro nгo tem dono :O !!");
RemovePlayerFromVehicle(playerid);
}
if(HouseInfo[i][hOwned]==1)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
if(strcmp(playername,HouseInfo[i][hOwner],true)==0)
{
format(string,sizeof(string),"Bem Vindo ao seu veнculo, %s.",HouseInfo[i][hOwner]);
SendClientMessage(playerid, 0xFFFF00AA, string);
}else
{
format(string,sizeof(string),"Apenas %s pode dirigir esse veнculo por ser o dono.",HouseInfo[i][hOwner]);
SendClientMessage(playerid, 0xFFFF00AA, string);
RemovePlayerFromVehicle(playerid);
}
}
}
}
}