help with arrays
#1

looks

errors
Код:
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(6038) : error 017: undefined symbol "GetPlayerIdFromName"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(6039) : warning 204: symbol is assigned a value that is never used: "passengerid"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(6037) : warning 204: symbol is assigned a value that is never used: "found"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(6065) : warning 225: unreachable code
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(15081) : warning 202: number of arguments does not match definition
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(21998) : warning 202: number of arguments does not match definition
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(26062) : error 017: undefined symbol "GetPlayerID"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(8409) : warning 204: symbol is assigned a value that is never used: "CrearEmisoraPickup"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(15013) : warning 204: symbol is assigned a value that is never used: "GiftAllowed"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(15013 -- 50687) : warning 203: symbol is never used: "IsAForbidden"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(8422) : warning 204: symbol is assigned a value that is never used: "JobPickup"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(8422 -- 50687) : warning 203: symbol is never used: "ShowMenuLogin"
C:\Users\Android\Desktop\Maclao Stuff\SAMP\Android Roleplay\gamemodes\1.pwn(8410) : warning 204: symbol is assigned a value that is never used: "TransmitirEmisoraPickup"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Код:
if(Basurero[playerid] == 1) // This checks if our variable equals to 1, if so: it continues
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(!IsABasureroVehicles(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		{
		    SendClientMessageEx(playerid, COLOR_GREY, "Debes ser el conductor.");
			return 1;
		}
			new found = 0;
			new passengerid;
			for(new i = 0; i<MAX_PLAYERS; i++)
			{
			    if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(i) && GetPlayerVehicleSeat(i) == 1)
			    {
			        if(Info[i][pJob] != 15)
			        {
			            SendClientMessageEx(playerid, COLOR_GREY, "El pasajero debe ser Basurero");
			            return 1;
					}
					else
					{
					found = 1;
					LosBasureros[1] = GetPlayerIdFromName(i);
		            passengerid = i;
		            DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
			        Basurero[playerid] = 2; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
			        SetPlayerCheckpoint(playerid, 990.5742,-1807.2267,13.7222, 3.0); // Creates a new checkpoint at a different position
			        SendClientMessage(playerid, 0xFFFFFFFF, "ha comenzado a trabajar siga el recorrido.");
				    }
				}
				return 1;
			}
			return 1;
	}

	if(Basurero[playerid] == 2) // This checks if our variable equals to 2, if so: it continues
    {
		if(!IsPlayerInRangeOfPoint(playerid, 5.0, 990.5742,-1807.2267,13.7222)) return 1;
		{
		    new vehicleid = GetPlayerVehicleID(playerid);
        	if(IsABasureroVehicles(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        	{
	      		DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
		        Basurero[playerid] = 3; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
				SetPlayerCheckpoint(LosBasureros[1], 986.3735,-1809.0529,14.2326, 3.0); // Creates a new checkpoint at a different position
				SendClientMessage(playerid, 0xFFFFFFFF, "Espera que tu companero recoja la basura.");
 			}
 			return 1;
		}
		return 1;
	}
Код:
	CMD:recojerbasura(playerid, params[])
	{
		if(Info[playerid][pJob] == 15)
		{
		    LosBasureros[0] = GetPlayerID();
		    Basurero[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
		    SetPlayerCheckpoint(playerid, -173.5974,-1612.5616,4.2428, 7.0); // This creates a checkpoint at the coцrdinates: "-269.1287,2610.6057,63.2069"
		    SendClientMessage(playerid, 0xFFFFFFFF, "Valla al checkpoint para comenzar");
		    return 1;
		}
		else
		{
			SendClientMessage(playerid, 0xFFFFFFFF, "Necesitas ser Basurero");
			return 1;
		}
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)