- 0
Problema intrare vehicul personal.
-
Similar Content
-
- 8 replies
- 1,200 views
-
- 1 answer
- 239 views
-
- 3 answers
- 356 views
-
- 3 replies
- 407 views
-
- 2 replies
- 35 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Link to comment
Share on other sites
12 answers to this question
Recommended Posts