[pomoc] Problem oko izlaska iz kuce

Započeo Eazy_E, Maj 31, 2011, 20:55:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Street Stories RolePlay
Detaljan opis problema://

Ja kupim kucu kuram /enter udjem kucam /exit izadjem izadjem sa servera...i budem u kuci kucam /exit nece.....
teleportujem se do centra odem do kuce kucam /enter moze da udje kucam /exit i moze da izadje znaci nece
da mi izadje iz kuce kad udjem u server i stvorim se u njoj ovaj problem me dugo muci i onaj ko bi mi pomogo bijo bih mu bas zahvalan :/ :)

Dio skripte://
Neke slike/video za lakse dobivanje pomoci(neobavezno):

Johnny

Probaj ubaciti ovu komandu:


if(strcmp(cmd, "/exit", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
    if(HouseEntered[playerid] != 9999)
    {
new i = HouseEntered[playerid];

if (IsPlayerInRangeOfPoint(playerid, 3,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVirWorld] = 0;
HouseEntered[playerid] = 9999;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}

Citat: Johnny[E] poslato Maj 31, 2011, 21:03:53 POSLE PODNE
Probaj ubaciti ovu komandu:


if(strcmp(cmd, "/exit", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
    if(HouseEntered[playerid] != 9999)
    {
new i = HouseEntered[playerid];

if (IsPlayerInRangeOfPoint(playerid, 3,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
SafeSetPlayerInterior(playerid,0);
SafeSetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVirWorld] = 0;
HouseEntered[playerid] = 9999;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}


C:\Users\Nemanja\Desktop\Balkan-Familyz\gamemodes\BMWRolePlay.pwn(28088) : error 033: array must be indexed (variable "HouseInfo")
C:\Users\Nemanja\Desktop\Balkan-Familyz\gamemodes\BMWRolePlay.pwn(28088) : error 001: expected token: ";", but found "]"
C:\Users\Nemanja\Desktop\Balkan-Familyz\gamemodes\BMWRolePlay.pwn(28088) : error 029: invalid expression, assumed zero
C:\Users\Nemanja\Desktop\Balkan-Familyz\gamemodes\BMWRolePlay.pwn(28088) : fatal error 107: too many error messages on one line

Johnny

Daj redove, za prvi eror to ti je variable znaci pise HouseInfo mozda je kod tebe pHouseInfo ili pHouse to stvarno ne znam proveri .

Citat: Johnny[E] poslato Maj 31, 2011, 21:34:03 POSLE PODNE
Daj redove, za prvi eror to ti je variable znaci pise HouseInfo mozda je kod tebe pHouseInfo ili pHouse to stvarno ne znam proveri .

(28088)  if (IsPlayerInRangeOfPoint(playerid, 3,HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz]))

Probaj sad Ubaci.


if(strcmp(cmd, "/exit", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i <  sizeof(HouseInfo); i++)
{
//printf("House :%d",i);
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
    if(HouseEntered[playerid] == i)
    {
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
Poslednja Izmena: Maj 31, 2011, 21:53:00 POSLE PODNE od Bp Jovan