- 0
Problema intrare vehicul personal.
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Cosmarul
Problema intalnita (descriere):Poi, vreau sa fac ca proprietarul masini sa poata intra in masina fara ca masina sa fie descuiata... dar nu prea merge. Eu am adaugat la functie codul "vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid))".
Ero(area / rile) / warning-(ul / urile):
Toata Functia:
if(OwnedVeh(vid) != 0) { new iMsg[128]; if(vInfo[OwnedVeh(vid)][vDestroyed] == 1 && !strmatch(vInfo[OwnedVeh(vid)][vOwner], "Unbought") && OdoVehicle(GetVehicleModel(vid)) == 1) { if(strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { new insurance = 100 + floatround(vInfo[OwnedVeh(vid)][vKm]); format(iMsg, sizeof(iMsg), "This vehicle is damaged.\nYou need to pay $%s.", FormatNumber(insurance)); ShowPlayerDialog(playerid,DIALOG_INS,DIALOG_STYLE_MSGBOX,"INSURANCE",iMsg,"Pay","Exit"); TogglePlayerControllableEx(playerid, false); } else { SendClientMessage(playerid, COLOR_SYN2, "This vehicle is damaged, type /exit."); TogglePlayerControllableEx(playerid, false); } } else if(strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { format(iMsg, sizeof(iMsg), "Welcome to your vehicle, %s.", GetName(playerid)); SendClientMessage(playerid, COLOR_SYN2, iMsg); } else if(!strmatch(vInfo[OwnedVeh(vid)][vOwner], GetName(playerid))) { if(PlayerInfo[playerid][pAdmin] < 5 && vInfo[OwnedVeh(vid)][vLocked] == 1 || vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid)) { SendClientMessage(playerid, COLOR_SYN2, "This vehicle is locked, type /exit."); TogglePlayerControllableEx(playerid, false); } else { format(iMsg, sizeof(iMsg), "This vehicle is owned by %s.", vInfo[OwnedVeh(vid)][vOwner]); SendClientMessage(playerid, COLOR_SYN2, iMsg); } } }Linia cu eroarea:
if(PlayerInfo[playerid][pAdmin] < 5 && vInfo[OwnedVeh(vid)][vLocked] == 1 || vInfo[OwnedVeh(vid)][vOwner] == GetName(playerid))Eroarea primita:
error 033: array must be indexed (variable "GetName")Liniile de cod / sursa / script-ul(obligatoriu): Mai sus.
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.
PS: Folosesc gm vProject.
12 answers to this question
Recommended Posts