09.02.2016, 22:21
I have an error when i compile the script: error 028: invalid subscript (not an array or too many subscripts): "drugdj"
The line is this:
and the command is this:
The line is this:
Code:
if(drugdj[playerid] == 1) return SendClientMessage(playerid,COLOR_WHITE,"{999999}Wait until you can share the pizza again.");
Code:
CMD:work(playerid, params[]) { new rand = random(sizeof(CursaRandomDrug)); if(IsPlayerInRangeOfPoint(playerid,7.0,-2546.0862,9.2330,16.4219)) { if(PlayerInfo[playerid][pJob] >= 1) { if(drugdj[playerid] == 1) return SendClientMessage(playerid,COLOR_WHITE,"{999999}Asteapta pana cand face o alta cursa."); { new Float:x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a); new vehicleid = CreateVehicle(459, x+3,y,z, a, -1, -1, -1); SetPlayerCheckpoint(playerid, CursaRandomDrug[rand][0], CursaRandomDrug[rand][1], CursaRandomDrug[rand][2], CursaRandomDrug[rand][3]); PutPlayerInVehicle(playerid, vehicleid, 0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "JOB: Livreaza drogurile la destinatia setata pe harta!"); drugdj[playerid] = 1; CP[playerid] = 0; } } } return 1; }