JohnGTPS
Membru-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Everything posted by JohnGTPS
-
error 052: multi-dimensional arrays must be fully initialized
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
if i make it to raceCheckpoints[0][0] to raceCheckpoints[0][3] it will be working properly? -
error 052: multi-dimensional arrays must be fully initialized
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
i think this is the my compiler version "Pawn compiler 3.2.3664 Copyright (c) 1997-2016, ITB CompuPhase" and btw i've try to replace [6] to [3] and this is the result -
error 052: multi-dimensional arrays must be fully initialized
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
ill try to replace [6] to [3] but i get a out of bounce then ill try to empty the 2nd dimension, it didnt compile, and the compiler didnt show any symbol that not used to and the .amx file is 0kb, is there any way to fix this problem? -
error 052: multi-dimensional arrays must be fully initialized
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
if i replace the [6] with [3] possible i get a out of bounce array. -
error 052: multi-dimensional arrays must be fully initialized
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
how? i don't get it -
hello guys! someone can help me im getting an error: error 052: multi-dimensional arrays must be fully initialized, i dont know why. MAX_RACE_CHECKPOINTS 6 new const Float:raceCheckpoints[MAX_RACE_CHECKPOINTS][6] = { {1366.896484, 430.360900, 19.168024}, {1323.226562, 330.576416, 18.968442}, {1343.616943, 299.939147, 18.961088}, {1398.594238, 272.719421, 18.965473}, {1382.345458, 217.131347, 18.931575} };
-
DisablePlayerRaceCheckpoint to the player2
JohnGTPS replied to JohnGTPS's topic in Discuţii scripting
can you give me an example code for this topic? and ill try to fix my script. -
hello guys! if the player1 is at the finish line how to remove it to the player2 from the race and disable his racecheckpoint // commands CMD:race(playerid, params[]) { new targetid, player2; if(sscanf(params, "u", targetid)) { return SCM(playerid, COLOR_SYNTAX, "Usage: /race [playerid]"); } if(PlayerInfo[playerid][pRace]) { return SCM(playerid, COLOR_SYNTAX, "You are currently in the race, type /quitrace to quit the currently race event."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SCM(playerid, COLOR_SYNTAX, "You can't use this command on yourself."); } PlayerInfo[playerid][pRace] = 1; PlayerInfo[targetid][pRace] = 1; IsPlayerInRace[playerid] = 1; IsPlayerInRace[targetid] = 1; PlayerInfo[targetid][pPlayer2] = player2; //Player1 = IsPlayerInRace[playerid]; //SetPlayerRaceCheckpoint( playerid, 0, raceCheckpoints[ 0 ][ 0 ], raceCheckpoints[ 0 ][ 1 ], raceCheckpoints[ 0 ][ 2 ], raceCheckpoints[ 1 ][ 3 ], raceCheckpoints[ 1 ][ 4 ], raceCheckpoints[ 1 ][ 5 ], 7.0 ); ShowPlayerDialog(playerid, DIALOG_RACE, DIALOG_STYLE_LIST, "Select Vehicle", "Infernus\nTurismo\nNRG-500\nSuperGT\nBullet", "Select", "Cancel"); return 1; } // example maded dialog if(listitem == 0) // INFERNUS { Vehicle1 = CreateVehicle(411, 403.526580, 2493.906005, 16.225225, 89.63, 0, 1, 0, 1); PutPlayerInVehicle(playerid, Vehicle1, 0); Vehicle2 = CreateVehicle(411, 403.405151, 2508.656250, 16.230072, 88.96, 0, 1, 0, 1); PutPlayerInVehicle(player2, Vehicle2, 0); startRace(playerid); startRace(player2); } startRace(playerid) { if(IsPlayerInRace[playerid]) { IsPlayerInRace[playerid] = 1; playerCheckpoint[playerid] = 0; SetPlayerRaceCheckpoint(playerid, 0, raceCheckpoints[0][0], raceCheckpoints[0][1], raceCheckpoints[0][2], raceCheckpoints[1][3], raceCheckpoints[1][4], raceCheckpoints[1][5], 7.0 ); SendClientMessage(playerid, -1, "Checkpoint set!, Goodluck!"); } return 1; } startRace1(playerid) { new player2 = PlayerInfo[playerid][pPlayer2]; if(IsPlayerInRace[pPlayer2]) { IsPlayerInRace[player2] = 1; playerCheckpoint[player2] = 0; SetPlayerRaceCheckpoint(player2, 0, raceCheckpoints[0][0], raceCheckpoints[0][1], raceCheckpoints[0][2], raceCheckpoints[1][3], raceCheckpoints[1][4], raceCheckpoints[1][5], 7.0 ); SendClientMessage(player2, -1, "Checkpoint set!, Goodluck!"); } return 1; }
-
one last thing, if i type /race then the dialog_race is shown up there are no checkpoints seted
-
can you fix it? thankyou somuch
-
can you check this my code? when you're at the first checkpoint, the next checkpoint doesn't show, then the first checkpoint hasn't disappeared yet? CMD:race(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SCM(playerid, COLOR_SYNTAX, "Usage: /race [playerid]"); } if(PlayerInfo[playerid][pRace]) { return SCM(playerid, COLOR_SYNTAX, "You are currently in the race, type /quitrace to quit the currently race event."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SCM(playerid, COLOR_SYNTAX, "You can't use this command on yourself."); } PlayerInfo[playerid][pRace] = 1; //Player1 = IsPlayerInRace[playerid]; //SetPlayerRaceCheckpoint( playerid, 0, raceCheckpoints[ 0 ][ 0 ], raceCheckpoints[ 0 ][ 1 ], raceCheckpoints[ 0 ][ 2 ], raceCheckpoints[ 1 ][ 3 ], raceCheckpoints[ 1 ][ 4 ], raceCheckpoints[ 1 ][ 5 ], 7.0 ); ShowPlayerDialog(playerid, DIALOG_RACE, DIALOG_STYLE_LIST, "Select Vehicle", "Infernus\nTurismo\nNRG-500\nSuperGT\nBullet", "Select", "Cancel"); return 1; } // for dialog case DIALOG_RACE: { if(response) { if(listitem == 0) // INFERNUS { startRace(playerid); } } } // and this is my function startRace(playerid) { if(IsPlayerInRace[playerid]) { SetPlayerRaceCheckpoint(playerid, 0, raceCheckpoints[ 0 ][ 0 ], raceCheckpoints[ 0 ][ 1 ], raceCheckpoints[ 0 ][ 2 ], raceCheckpoints[ 1 ][ 3 ], raceCheckpoints[ 1 ][ 4 ], raceCheckpoints[ 1 ][ 5 ], 7.0 ); SendClientMessage(playerid, -1, "POTANGINAAAAAA" ); } return 1; }
-
can you check this my code? when you're at the first checkpoint, the next checkpoint doesn't show, then the first checkpoint hasn't disappeared yet CMD:race(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { return SCM(playerid, COLOR_SYNTAX, "Usage: /race [playerid]"); } if(PlayerInfo[playerid][pRace]) { return SCM(playerid, COLOR_SYNTAX, "You are currently in the race, type /quitrace to quit the currently race event."); } if(!IsPlayerConnected(targetid)) { return SendClientMessage(playerid, COLOR_GREY, "The player specified is disconnected."); } if(targetid == playerid) { return SCM(playerid, COLOR_SYNTAX, "You can't use this command on yourself."); } PlayerInfo[playerid][pRace] = 1; //Player1 = IsPlayerInRace[playerid]; //SetPlayerRaceCheckpoint( playerid, 0, raceCheckpoints[ 0 ][ 0 ], raceCheckpoints[ 0 ][ 1 ], raceCheckpoints[ 0 ][ 2 ], raceCheckpoints[ 1 ][ 3 ], raceCheckpoints[ 1 ][ 4 ], raceCheckpoints[ 1 ][ 5 ], 7.0 ); ShowPlayerDialog(playerid, DIALOG_RACE, DIALOG_STYLE_LIST, "Select Vehicle", "Infernus\nTurismo\nNRG-500\nSuperGT\nBullet", "Select", "Cancel"); return 1; } // for dialog case DIALOG_RACE: { if(response) { if(listitem == 0) // INFERNUS { startRace(playerid); } } } // and this is my function startRace(playerid) { if(IsPlayerInRace[playerid]) { SetPlayerRaceCheckpoint(playerid, 0, raceCheckpoints[ 0 ][ 0 ], raceCheckpoints[ 0 ][ 1 ], raceCheckpoints[ 0 ][ 2 ], raceCheckpoints[ 1 ][ 3 ], raceCheckpoints[ 1 ][ 4 ], raceCheckpoints[ 1 ][ 5 ], 7.0 ); SendClientMessage(playerid, -1, "POTANGINAAAAAA" ); } return 1; }
-
IF THE PLAYER IS IN THE LAST RACE CHECKPOINT OR THE FINISH LINE, HOW TO BE DISABLED IT AND GIVE A REWARD?