Jump to content
  • 0

/rac error


Guest UnderCover

Question

Guest UnderCover

uitati :

if(strcmp(cmdtext, "/respawnallcars", true) == 0 || strcmp(cmdtext, "/rac", true) == 0)
	{
		if(PlayerInfo[playerid][pAdminlevel] < 1) return 0;
		for(new car = 0; car < MAX_VEHICLES; car++)
		{
			if (!IsAnyPlayerInVehicle(car)
			{
				SetVehicleToRespawn(car);
			}
		}
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "[ADMIN] All cars respawned by %s.", sendername);
		SendClientMessageToAll(COLOR_RED,string);
		return 1;
	}
// bottom
stock IsAnyPlayerInVehicle(vehicleid)
{
	for(new i = 0; i < MAX_PLAYERS; i++) if (IsPlayerInVehicle(vehicleid, i)) return 1;
	return 0;
}
l-am pus unde trebuie dupa public OnPlayerCommand... si uitati ce eroare da :
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9387) : error 017: undefined symbol "pAdminlevel"
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9390) : error 017: undefined symbol "IsAnyPlayerInVehicle"
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9401) : error 029: invalid expression, assumed zero
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9401) : error 017: undefined symbol "IsAnyPlayerInVehicle"
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9403) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\nErVi\My Documents\servar samp\San Andreas Multiplayer\Server SaMp\gamemodes\IRRPR.pwn(9408) : warning 225: unreachable code

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Uite ti-am facut eu aici o alta comanda

 if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0) //
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 1)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			    return 1;
			}
			new bool:unwanted[CAR_AMOUNT];
			for(new player=0; player<MAX_PLAYERS; player++)
     		{
            	if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
     		}
			for(new car = 1; car <= 268; car++)
			{
				if(!unwanted[car]) SetVehicleToRespawn(car);
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "SERVER: Toate masinile au fost respawnate de %s.", sendername);
			BroadCast(COLOR_WHITE,string);
		}
		return 1;
	}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By TheGodfather
      Salut, aveti idee cum pot sa rezolv problema aceasta?
      [02:54:59] Loading plugin: streamer.so
      [02:54:59] Failed (/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by plugins/streamer.so))
    • By Matei02Mihai
      Salut. Am vrut sa fac un gamemode micut pentru vizualizarea modpack-urilor, dar atunci cand pornesc serverul, imi da eroarea <<[09:35:17] Script[gamemodes/modpacks.amx]: Run time error 19: "File or function is not found">>. Am incercat sa pun acelasi gamemode pe un alt server. Acolo imi merge cum trebuie. Daca intru pe server cu acea eroare, face bugul ala clasic: te da sub pamant in spate la farmer, iar dupa te spawneaza in acelasi loc, dar pe pamant. Am incercat mai multe metode cu care credeam ca pot fixa bugul, cum ar fi:
      - deschiderea serverului cu drepturi de administrator;
      - schimbarea locatiei serverului;
      - instalarea .net framework 3.5;
      - reacerea serverului
      - dezactivare optiunii "Doar in citire"
    • By Wreeper
      Linia in cauza: SetPlayerName(id, amount);
      Daca scot chestia asta, merge total perfect functia..
      De ce se intampla asta?
    • By Andrei SA-MP
      public OnPlayerConnect(playerid) {
           gQuery[0] = EOS;
           mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM `users` WHERE `Name` = '%s' LIMIT 1', GetName(playerid));
           mysql_tquery(SQL, gQuery, "checkAccount', "i", playerid);
           return 1;
    • By Wreeper
      YCMD:unjail(playerid, params[], help) {
          if(!playerVariables[playerid][pAdmin]) return adminOnly(playerid);
          new id,reason[128];
          
          if(sscanf(params, "uis[128]", id,reason)) return sendUsage(playerid, "/unjail [name/playerid] [reason]");
          if(!isPlayerLogged(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "Player not connected.");
          if(playerVariables[id][pJailTime] == 0) return SCM(playerid, COLOR_WHITE, "This player is not in jail.");
          ResetWeapons(id);
          WantedPoints[id] = 0;
          playerVariables[id][pJailed] = 0;
          playerVariables[id][pJailTime] = 0;
          SpawnPlayer(id);
          SendAdminMessage(COLOR_RED2, "Jail: %s was unjailed by %s, reason: %s.", GetName(id), GetName(playerid),reason);
          SCMF(id, COLOR_RED2, "Administrator %s has released you from jail.", GetName(playerid));
          
          UpdateVar( id, "Jailed", playerVariables[ id ][ pJailed ] );
          UpdateVar( id, "JailTime", playerVariables[ id ][ pJailTime ] );
          return 1;
      }
       
      De ce se intampla asa ceva?
      Eroare: (18861) : error 035: argument type mismatch (argument 3)
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

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.