Search Results
You can try this under OnPlayerCommandText: Код: public OnPlayerCommandText(playerid, cmdtext[]) { //======SILVER CMDS VIP======Heal============== if(!strcmp(cmdtext,"/healme",true,7)) { i...
122
Try this: Code: public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid,playerid,reason); died[playerid] = 1; if(PlayerData[killerid][IsLaw] == 0 && otest[killerid] ...
53
You might want to check the wiki for more info on ShowPlayerNameTagForPlayer. Calling that function alone won't do anything. try adding below to OnPlayerConnect callback: Code: for(new i = 0; i <...
85
You must be having a player database folder using dini or sql Just open the player file, eg: When a player logs in, you open his file and update his ingame stats like Код: PlayerInfo[playerid][Ki...
139
Код: stock GetPlayerNumber(numero) { for(new i = 0; i <= GetMaxPlayers(); i++) { if(PlayerInfo[i][CellNumber] == numero) return i; // Playerinfo[i][Cel...
204
Код: for(new i = 0; i <= MAX_PLAYERS; ++i) You are scanning player ids... Код: if(PlayerInfo[i][numero]) Don't know what you are trying to do here... Код: new tnome[MAX_PLAYER_NAME];...
204
Make sure that you have your array name right. (Player) Show you array declaration at the top of the script.
77
Why are you creating a new file under OnPlayerDisconnect if the player is already logged in? Код: if(gPlayerLogged[playerid] == 1) dini_Create(file); You only create a new file under Regi...
70
The player will go to class selection only in the beginning of the game unless you force it. In that case, just declare another variable and set it's value to something. When you want to check if the ...
116
You can use SetTimerEx for that. Just make a new function called Repair Vehicle and call this function using this timer. This timer code goes after the user gets a message "Your car needs to be statio...
174
OnPlayerStateChange and OnPlayerKeyStateChange are two different callbacks. Код: public OnPlayerStateChange(playerid, newstate, oldstate) { if(Act[playerid] == 1) { if(oldstate == PLAYER_STA...
79
You don't need a timer if you have command. And yes, it does check if the vehicle is static everytime you type in that command.
174
If you have textdraws for each player, then you need to destroy the text draw under OnPlayerDisconnect. If you have common textdraws for everybody, you only need to destroy the textdraws under OnGameM...
54
Firstly; Код: if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER) should be Код: if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) Secondly, you do have this...
79
If you have a command like /fix, everytime the player enter the command, it will check if the vehicle is stationary. If you don't and have a checkpoint or are using IsPlayerInRangeOfPoint instead, you...
174
Under your carfix command: Код: new Float:Velocity[3]; GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]); if(Velocity[0] != 0 || Velocity[1] != 0 || Velocity...
174
You can use GetVehicleVelocity function to find the x,y and z components of the velocity and check if they are zero or not.
174
Check the code under OnGameModeInit(). What do you mean by invisible? 1)You can ride the car but others can't see you? Possible Cause: You are using LinkVehicleToInterior() to link the vehicle to an ...
180
If "remove vehicleid 29" means removing it from OnGameModeInit manually, you need to rename the "30.ini" to "29.ini" manually as well. Because the compiler doesn't keep record of the vehicle that "wa...
68
Wherever possible, put: Код: if(IsPlayerNPC(playerid)) return 1; or: Код: if(!IsPlayeNPC(playerid)) { //your code } That way it won't affect NPCs.
108