03.07.2013, 21:35
Im using system like this one... for my bizz system... try this one:
Problem in your code is, "GarageInfo[h][gOwned]", you got smthing like this "PlayerInfo[playerid][pGarageKey]"?
pawn Код:
CMD:entergarage(playerid, params[])
{
for(new h = 0; h < (GarageInfo); h++)
{
if(GarageInfo[h][gOwned] == 1 )
{
if(IsPlayerInRangeOfPoint(playerid,2.0,GarageInfo[h][gExteriorX], GarageInfo[h][gExteriorY], GarageInfo[h][gExteriorZ]) )
{
SetPlayerPos(playerid,GarageInfo[garageid][gInteriorX],GarageInfo[garageid][gInteriorY],GarageInfo[garageid][gInteriorZ]);
GameTextForPlayer(playerid, "~w~Welcome to your garage!", 5000, 3);
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You are not near to your garage entrance! ");
}
}
else
{
SendClientMessage(playerid, 0x33CCFFAA, "You don't own a garage.");
}
}
return 1;
}