Jump to content

gabygabyt

Membru
  • Posts

    9
  • Joined

  • Last visited

Posts posted by gabygabyt

  1. Acum 11 minute, DaEdRiC-FoX a spus:

    Corect este:

    New gRandInsta[3][//câte locații să fie] =

    {

    "X,Y,Z",

    "X,Y,Z"

    };

    Sper să nu fi greșit ceva, sunt pe telefon.

     

    Revin cu un reply dupa ce incerc.

    Acum 2 minute, gabygabyt a spus:

    Revin cu un reply dupa ce incerc.

    Multumesc mult. Acum merge.

    Rezolvat. Cer T/C.

  2. Il vreau intr-o anumita locatie. 

     

    EDIT: dupa ce am pus gRandomInsta[rand][0] primesc erorile astea: 

    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(1187) : error 017: undefined symbol "rand"
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38702) : warning 224: indeterminate array size in "sizeof" expression (symbol "")

    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(1187) : error 017: undefined symbol "rand"
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38702) : warning 224: indeterminate array size in "sizeof" expression (symbol "")

     

  3. GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
    					SetPlayerCheckpoint(playerid,gRandomInsta[rand][0],gRandomInsta[rand][1],gRandomInsta[rand][2], 4.0);
    					floatround(GetDistanceBetweenPoints(Position[0],Position[1], Position[2], gRandomInsta[rand][0], gRandomInsta[rand][1], gRandomInsta[rand][2]), floatround_round);

     

  4. CMD:instalator(playerid, params[])
    {
    	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
        if(IsPlayerConnected(playerid))
        {
    		if(PlayerInfo[playerid][pJob] == 16)
    		{
    			new Veh = GetPlayerVehicleID(playerid);
    			if(Veh == instac[1] || Veh == instac[2] || Veh == instac[3] || Veh == instac[4] || Veh == instac[5] || Veh == instac[6] || Veh == instac[7] || Veh == instac[8] || Veh == instac[9] || Veh == instac[10] || Veh == instac[11] || Veh == instac[12] && PlayerInfo[playerid][pJob] == 16)
    			{
    				if(GetPlayerState(playerid) == 2)
    			    {
    			        DisablePlayerRaceCheckpoint(playerid);
    		            new rand,Float:Position[3];
    					rand = random(sizeof(gRandomInsta));
    					GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
    					SetPlayerCheckpoint(playerid,gRandomInsta[rand][0],gRandomInsta[rand][1],gRandomInsta[rand][2], 4.0);
    					floatround(GetDistanceBetweenPoints(Position[0],Position[1], Position[2], gRandomInsta[rand][0], gRandomInsta[rand][1], gRandomInsta[rand][2]), floatround_round);
    					InstaCP[playerid] = 1;
    					SCM(playerid,COLOR_GREY,"Mergi la checkpointul de pe mapa pentru a repara teava casei.");
    			    }
    			    else return SCM(playerid,COLOR_WHITE,"You are not the driver of instalator car.");
    			}
    			else return SCM(playerid,COLOR_WHITE,"You are not in a instalator car.");
    		}
    		else return SCM(playerid,COLOR_WHITE,"You are not a Instalator.");
    	}
    	return 1;
    }

    Nu stiu care sunt liniile ce imi dau eroare. Asta e problema

  5. Am si eu nevoie de ajutor. Primesc urmatoarele erori:C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38704) : error 001: expected token: ",", but found "["
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38704) : error 029: invalid expression, assumed zero
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38704) : warning 215: expression has no effect
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38704) : error 001: expected token: ";", but found "]"
    C:\Users\Gabi\Desktop\Server with gamemode\gamemodes\gmpower.pwn(38704) : fatal error 107: too many error messages on one line

     

    La comanda asa:

    CMD:instalator(playerid, params[])
    {
        if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pJob] == 16)
            {
                new Veh = GetPlayerVehicleID(playerid);
                if(Veh == instac[1] || Veh == instac[2] || Veh == instac[3] || Veh == instac[4] || Veh == instac[5] || Veh == instac[6] || Veh == instac[7] || Veh == instac[8] || Veh == instac[9] || Veh == instac[10] || Veh == instac[11] || Veh == instac[12] && PlayerInfo[playerid][pJob] == 16)
                {
                    if(GetPlayerState(playerid) == 2)
                    {
                        DisablePlayerRaceCheckpoint(playerid);
                        new rand,Float:Position[3];
                        rand = random(sizeof(gRandomInsta));
                        GetPlayerPos(playerid, Position[0], Position[1], Position[2]);
                        SetPlayerCheckpoint(playerid,gRandomInsta[rand][0],gRandomInsta[rand][1],gRandomInsta[rand][2], 4.0);
                        floatround(GetDistanceBetweenPoints(Position[0],Position[1], Position[2], gRandomInsta[rand][0], gRandomInsta[rand][1], gRandomInsta[rand][2]), floatround_round);
                        InstaCP[playerid] = 1;
                        SCM(playerid,COLOR_GREY,"Mergi la checkpointul de pe mapa pentru a repara teava casei.");
                    }
                    else return SCM(playerid,COLOR_WHITE,"You are not the driver of instalator car.");
                }
                else return SCM(playerid,COLOR_WHITE,"You are not in a instalator car.");
            }
            else return SCM(playerid,COLOR_WHITE,"You are not a Instalator.");
        }
        return 1;
    }

×
×
  • 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.