Jump to content
  • 0

script masini personale


Dynamic

Question

am o problema cu masinile personale am 2 comenzi in gm una cu /v create si una cu /av care numa la owner merge.

cand isi creeaza careva masina personala cu /vcreate nu merge

si knd creez eu cu /av setez owneru setez owned: 1 si knd sa intru in masina zice vehicul personal a lui Dynamic si nu ma lasa.

Help pls

scriptu cu /av

[pawn]if(strcmp(cmd, "/av", true) == 0 || strcmp(cmd, "/avehicle", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");

            return 1;

        }

        new x_nr[64];

        x_nr = strtok(cmdtext, idx);

        if(!strlen(x_nr))

        {

            SendClientMessage(playerid, COLOR_WHITE, "HINT: (/av)ehicle [name]");

            SendClientMessage(playerid, COLOR_WHITE, "Available names: destroy, create, edit, info");

            return 1;

        }

if(PlayerInfo[playerid][pAdmin] >= 1338)

{

if(strcmp(x_nr, "destroy", true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: destroy [car id]");

return 1;

}

new car;

new text[20];

car = strval(tmp);

if(CarInfo[car][cOwned] == 0)

{

SendClientMessage(playerid, COLOR_GRAD2, "This is not an ownable car!");

return 1;

}

CarInfo[car][cOwned] = 0;

text = "No-One";

strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);

SendClientMessage(playerid, COLOR_WHITE, "* You sold this car!");

DestroyVehicle(car);

SaveCar(car);

}

else if(strcmp(x_nr,"create",true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: create [carmodel] [color1] [color2]");

return 1;

}

new model;

model = strval(tmp);

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: create [carmodel] [color1] [color2]");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 && color1 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: create [carmodel] [color1] [color2]");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 && color2 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

new car = 0;

for(new h = 760; h < sizeof(CarInfo); h++)

{

if(CarInfo[h][cOwned] == 0)

{

car = h;

h = 1500;

}

}

format(string, 128, "cars/%d.ini", car);

new Float:AX,Float:AY,Float:AZ,Float:Angle;

GetPlayerPos(playerid, AX,AY,AZ);

GetPlayerFacingAngle(playerid, Angle);

if(dini_Exists(string))

{

CarInfo[car][cID] = car;

CarInfo[car][cOwned] = 1;

new text[20];

text = "No-One";

strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);

CarInfo[car][cLocationx] = AX;

CarInfo[car][cLocationy] = AY;

CarInfo[car][cLocationz] = AZ;

CarInfo[car][cAngle] = Angle;

CarInfo[car][cModel] = model;

CarInfo[car][cColorOne] = color1;

CarInfo[car][cColorTwo] = color2;

SaveCar(car);

}

else

{

dini_Create(string);

CarInfo[car][cID] = car;

CarInfo[car][cOwned] = 1;

new text[20];

text = "No-One";

strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);

CarInfo[car][cLocationx] = AX;

CarInfo[car][cLocationy] = AY;

CarInfo[car][cLocationz] = AZ;

CarInfo[car][cAngle] = Angle;

CarInfo[car][cModel] = model;

CarInfo[car][cColorOne] = color1;

CarInfo[car][cColorTwo] = color2;

SaveCar(car);

}

ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],CarInfo[car][cAngle],CarInfo[car][cColorOne],CarInfo[car][cColorTwo],300);

SendClientMessage(playerid, COLOR_GRAD2, "Type /avehicle to view the vehicle manual!");

}

else if(strcmp(x_nr,"edit",true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "{00A1FF}USAGE{FFFFFF}: /edit [statcode] [amount]");

SendClientMessage(playerid, COLOR_GRAD4, "|1 ID |2 Model |3 Owner |4 Owned ");

return 1;

}

new stat;

stat = strval(tmp);

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "{00A1FF}USAGE{FFFFFF}: /edit [statcode] [amount]");

SendClientMessage(playerid, COLOR_GRAD4, "|1 ID |2 Model |3 Owner |4 Owned ");

return 1;

}

new amount;

amount = strval(tmp);

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

new vehid = GetPlayerVehicleID(playerid);

if(IsAnPersonalCar(vehid))

{

switch (stat)

{

case 1:

{

CarInfo[vehid][cID] = amount;

format(string, sizeof(string), "  The Car ID Was Set To %d", amount);

SendClientMessage(playerid, COLOR_GREY, string);

}

case 2:

{

CarInfo[vehid][cModel] = amount;

format(string, sizeof(string), "  The Car Model Was Set To %d", amount);

SendClientMessage(playerid, COLOR_GREY, string);

}

case 3:

{

GetPlayerName(amount, sendername, sizeof(sendername));

strmid(CarInfo[vehid][cOwner], sendername, 0, strlen(sendername), 999);

format(string, sizeof(string), "  The Car Owner Was Set To %s", sendername);

SendClientMessage(playerid, COLOR_GREY, string);

}

case 4:

{

CarInfo[vehid][cOwned] = amount;

format(string, sizeof(string), "  The Car Owned Was Set To %d", amount);

SendClientMessage(playerid, COLOR_GREY, string);

}

}

SaveCar(vehid);

}

else

{

SendClientMessage(playerid, COLOR_GREY, "This car isn't an personal car");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You must be in an personal car");

return 1;

}

}

else if(strcmp(x_nr,"info",true) == 0)

{

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

new vehid = GetPlayerVehicleID(playerid);

format(string, sizeof(string), "Owned: %d | Owner: %s | CarColor1: %d | CarColor2: %d | CarID: %d", CarInfo[vehid][cOwned], CarInfo[vehid][cOwner], CarInfo[vehid][cColorOne], CarInfo[vehid][cColorTwo], CarInfo[vehid][cID]);

SendClientMessage(playerid, COLOR_WHITE, string);

}

}

else

{

SendClientMessage(playerid, COLOR_WHITE, "HINT: (/av)ehicle [name]");

SendClientMessage(playerid, COLOR_WHITE, "Available names: destroy, create, edit, info");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You must be an admin to use this command");

return 1;

}

}

}[/pawn]

Scriptu cu /v create:

[pawn]if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You need to login first ! ");

            return 1;

        }

if(PlayerInfo[playerid][pCarBan] == 1)

{

SendClientMessage(playerid, COLOR_GREY, "    You'r banned to use /v commands ! ");

return 1;

}

if(PlayerInfo[playerid][pLevel] >= 3 && PlayerInfo[playerid][pConnectTime] >= 36)

        {

new x_nr[64];

x_nr = strtok(cmdtext, idx);

if(!strlen(x_nr))

{

SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");

SendClientMessage(playerid, COLOR_WHITE, "Available names: park, color, create");

return 1;

}

else if(strcmp(x_nr,"park",true) == 0)

{

if(PlayerInfo[playerid][pCar] == 9999)

{

SendClientMessage(playerid, COLOR_GREY, "You don't own a car.");

return 1;

}

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

new carid = GetPlayerVehicleID(playerid);

if(carid == PlayerInfo[playerid][pCar])

{

new Float:x,Float:y,Float:z;

new Float:a;

GetPlayerName(playerid, playername, sizeof(playername));

GetVehiclePos(carid, x, y, z);

GetVehicleZAngle(carid, a);

CarInfo[carid][cLocationx] = x;

CarInfo[carid][cLocationy] = y;

CarInfo[carid][cLocationz] = z;

CarInfo[carid][cAngle] = a;

format(string, sizeof(string), "You have saved your vehicle at the position %f.01, %f.01, %f.01, Remember it, it will respawn here!",x,y,z);

SendClientMessage(playerid, TEAM_GROVE_COLOR, string);

SaveCar(carid);

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You'r not in your car.");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You'r not in a car.");

return 1;

}

return 1;

}

else if(strcmp(x_nr,"color",true) == 0)

{

if(PlayerInfo[playerid][pCar] == 9999)

{

SendClientMessage(playerid, COLOR_GREY,"* You don't have a vehicle to respray.");

return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}USAGE{FFFFFF}: /v color [ColorOneID] [ColorTwoID] (50.000$ cost)");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 && color1 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}USAGE{FFFFFF}: /v color [ColorOneID] [ColorTwoID] (50.000$ cost)");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 && color2 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

if(GetPlayerMoney(playerid) < 50000)

{

SendClientMessage(playerid, COLOR_GREY, "  Nu ai suficienti bani!");

return 1;

}

if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)

{

new vehid = GetPlayerVehicleID(playerid);

if(CarInfo[vehid][cID] == PlayerInfo[playerid][pCar])

{

CarInfo[vehid][cColorOne] = color1;

CarInfo[vehid][cColorTwo] = color2;

ChangeVehicleColor(vehid, color1, color2);

GivePlayerMoney(playerid, -50000);

SendClientMessage(playerid, COLOR_WHITE, "Ti-ai modificat culoarea!");

SaveCar(vehid);

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You'r not in your car.");

return 1;

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "You'r not in a car.");

return 1;

}

return 1;

}

else if(strcmp(x_nr,"create",true) == 0)

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: create [color1] [color2]");

return 1;

}

new color1;

color1 = strval(tmp);

if(color1 < 0 && color1 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: create [color1] [color2]");

return 1;

}

new color2;

color2 = strval(tmp);

if(color2 < 0 && color2 > 126)

{

SendClientMessage(playerid, COLOR_GREY, "  Wrong color id!");

return 1;

}

new car = 0;

if(PlayerInfo[playerid][pCar] == 9999) { }

else return SendClientMessage(playerid, COLOR_GREY,"* You already own a car!");

for(new h = 760; h < sizeof(CarInfo); h++)

{

if(CarInfo[h][cOwned] == 0)

{

car = h;

h = 1300;

}

}

new Float:AX,Float:AY,Float:AZ,Float:Angle;

GetPlayerPos(playerid, AX,AY,AZ);

GetPlayerFacingAngle(playerid, Angle);

format(string, 128, "cars/%d.ini", car);

new playername2[MAX_PLAYER_NAME];

playername2 = PlayerName(playerid);

if(dini_Exists(string))

{

CarInfo[car][cID] = car;

CarInfo[car][cOwned] = 1;

strmid(CarInfo[car][cOwner], playername2, 0, strlen(playername2), 999);

CarInfo[car][cLocationx] = AX;

CarInfo[car][cLocationy] = AY;

CarInfo[car][cLocationz] = AZ;

CarInfo[car][cAngle] = Angle;

CarInfo[car][cModel] = 522;

CarInfo[car][cColorOne] = color1;

CarInfo[car][cColorTwo] = color2;

SaveCar(car);

}

else

{

dini_Create(string);

CarInfo[car][cID] = car;

CarInfo[car][cOwned] = 1;

strmid(CarInfo[car][cOwner], playername2, 0, strlen(playername2), 999);

CarInfo[car][cLocationx] = AX;

CarInfo[car][cLocationy] = AY;

CarInfo[car][cLocationz] = AZ;

CarInfo[car][cAngle] = Angle;

CarInfo[car][cModel] = 522;

CarInfo[car][cColorOne] = color1;

CarInfo[car][cColorTwo] = color2;

SaveCar(car);

}

PlayerInfo[playerid][pCar] = car;

ownedcar[car] = CreateVehicle(522,CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],CarInfo[car][cAngle],CarInfo[car][cColorOne],CarInfo[car][cColorTwo],300);

SendClientMessage(playerid, COLOR_GRAD2, "Congratulations on your new purchase!");

SendClientMessage(playerid, COLOR_GRAD2, "Type /vehicle to view the vehicle manual!");

GameTextForPlayer(playerid, "~p~Congratulations~n~~w~Don't forget where you placed you'r new ~b~car!", 5000, 3);

}

else

{

SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");

SendClientMessage(playerid, COLOR_WHITE, "Available names: color, park, create");

return 1;

}

        }

else

{

SendClientMessage(playerid, COLOR_GRAD2, "Trebuie sa ai level 3 si 36 ore pe server!");

return 1;

}

    }

    return 1;

}[/pawn]

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

//===============================[/acreatecar]==================================
	if(strcmp(cmd, "/acreatecar", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1339 || IsPlayerAdmin(playerid))
     	{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]");
				return 1;
			}
			new car;
			car = strval(tmp);
			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* Vehicle Number can't be below 400 or above 611 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new color1;
			color1 = strval(tmp);
			if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* De la 0 pana la 126 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new color2;
			color2 = strval(tmp);
			if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* De la 0 pana la 126 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
            new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
            new value = strval(tmp);
 	 		CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
			CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
		 	CarInfo[thiscar][cValue] = value; CarInfo[thiscar][paintjob] = -1; LoadComponents(thiscar); PutPlayerInVehicle(playerid,thiscar,0);
			strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
			format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
			format(TextCar, sizeof(TextCar), "{EE1111}De vanzare: {80D52B}• $%d •", CarInfo[thiscar][cValue]);
	        TextUpCar[thiscar] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);
	        Attach3DTextLabelToVehicle(TextUpCar[thiscar], thiscar, 0.0, 0.0, 0.1);
			format(string, sizeof(string), " Vehicul personal a fost creat. ID: {FFFFFF}[%d]", thiscar);
			SendClientMessage(playerid, COLOR_GREEN, string);
			OnCarUpdate();
			return 1;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, " Nu esti autorizat sa folosesti comanda ");
			return 1;
		}
	}

Aceasta este comanda, foloseste-o!

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

//===============================[/acreatecar]==================================
	if(strcmp(cmd, "/acreatecar", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1339 || IsPlayerAdmin(playerid))
     	{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]");
				return 1;
			}
			new car;
			car = strval(tmp);
			if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* Vehicle Number can't be below 400 or above 611 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new color1;
			color1 = strval(tmp);
			if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* De la 0 pana la 126 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new color2;
			color2 = strval(tmp);
			if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_WHITE, "{0950F7}* De la 0 pana la 126 !"); return 1; }
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "{00A1FF}Foloseste:{C0C0C0} /acreatecar [carid] [color1] [color2] [price]"); return 1; }
			new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z);
            new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
            new value = strval(tmp);
 	 		CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2;
			CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1;
		 	CarInfo[thiscar][cValue] = value; CarInfo[thiscar][paintjob] = -1; LoadComponents(thiscar); PutPlayerInVehicle(playerid,thiscar,0);
			strmid(CarInfo[vehid][cOwner], "Dealership", 0, strlen("Dealership"), 999);
			format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
			format(TextCar, sizeof(TextCar), "{EE1111}De vanzare: {80D52B}• $%d •", CarInfo[thiscar][cValue]);
	        TextUpCar[thiscar] = Create3DTextLabel(TextCar, 0x33AAFFFF , 0.0, 0.0, 0.0, 25, 0, 1);
	        Attach3DTextLabelToVehicle(TextUpCar[thiscar], thiscar, 0.0, 0.0, 0.1);
			format(string, sizeof(string), " Vehicul personal a fost creat. ID: {FFFFFF}[%d]", thiscar);
			SendClientMessage(playerid, COLOR_GREEN, string);
			OnCarUpdate();
			return 1;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, " Nu esti autorizat sa folosesti comanda ");
			return 1;
		}
	}

Aceasta este comanda, foloseste-o!

[pawn]

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(18404) : error 017: undefined symbol "cValue"

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(18404) : error 017: undefined symbol "paintjob"

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(18404) : error 017: undefined symbol "LoadComponents"

C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(18404) : fatal error 107: too many error messages on one line

[/pawn]

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

if(strcmp(cmd, "/av", true) == 0 || strcmp(cmd, "/avehicle", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You need to login first ! ");
	            return 1;
	        }
	        new x_nr[64];
	        x_nr = strtok(cmdtext, idx);
	        if(!strlen(x_nr))
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "HINT: (/av)ehicle [name]");
	            SendClientMessage(playerid, COLOR_WHITE, "Available names: destroy, create, edit, info");
	            return 1;
	        }
			if(PlayerInfo[playerid][pAdmin] >= 1338)
			{
				if(strcmp(x_nr, "destroy", true) == 0)
				{
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: destroy [car id]");
						return 1;
					}
					new car;
					new text[20];
					car = strval(tmp);
					if(CarInfo[car][cOwned] == 0)
					{
						SendClientMessage(playerid, COLOR_GRAD2, "This is not an ownable car!");
						return 1;
					}
					CarInfo[car][cOwned] = 0;
					text = "No-One";
					strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);
					SendClientMessage(playerid, COLOR_WHITE, "* You sold this car!");
					DestroyVehicle(car);
					SaveCar(car);
				}
				else if(strcmp(x_nr,"create",true) == 0)
				{
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: create [carmodel] [color1] [color2]");
						return 1;
					}
					new model;
					model = strval(tmp);
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: create [carmodel] [color1] [color2]");
						return 1;
					}
					new color1;
					color1 = strval(tmp);
					if(color1 < 0 && color1 > 126)
					{
						SendClientMessage(playerid, COLOR_GREY, "   Wrong color id!");
						return 1;
					}
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: create [carmodel] [color1] [color2]");
						return 1;
					}
					new color2;
					color2 = strval(tmp);
					if(color2 < 0 && color2 > 126)
					{
						SendClientMessage(playerid, COLOR_GREY, "   Wrong color id!");
						return 1;
					}
					new car = 0;
					for(new h = 760; h < sizeof(CarInfo); h++)
					{
						if(CarInfo[h][cOwned] == 0)
						{
							car = h;
							h = 1500;
						}
					}

					format(string, 128, "cars/%d.ini", car);

					new Float:AX,Float:AY,Float:AZ,Float:Angle;
					GetPlayerPos(playerid, AX,AY,AZ);
					GetPlayerFacingAngle(playerid, Angle);

					if(dini_Exists(string))
					{
						CarInfo[car][cID] = car;
						CarInfo[car][cOwned] = 1;
						new text[20];
						text = "No-One";
						strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);
						CarInfo[car][cLocationx] = AX;
						CarInfo[car][cLocationy] = AY;
						CarInfo[car][cLocationz] = AZ;
						CarInfo[car][cAngle] = Angle;
						CarInfo[car][cModel] = model;
						CarInfo[car][cColorOne] = color1;
						CarInfo[car][cColorTwo] = color2;

						SaveCar(car);
					}
					else
					{
						dini_Create(string);
						CarInfo[car][cID] = car;
						CarInfo[car][cOwned] = 1;
						new text[20];
						text = "No-One";
						strmid(CarInfo[car][cOwner], text, 0, strlen(text), 999);
						CarInfo[car][cLocationx] = AX;
						CarInfo[car][cLocationy] = AY;
						CarInfo[car][cLocationz] = AZ;
						CarInfo[car][cAngle] = Angle;
						CarInfo[car][cModel] = model;
						CarInfo[car][cColorOne] = color1;
						CarInfo[car][cColorTwo] = color2;

						SaveCar(car);
					}

					ownedcar[car] = CreateVehicle(CarInfo[car][cModel],CarInfo[car][cLocationx],CarInfo[car][cLocationy],CarInfo[car][cLocationz],CarInfo[car][cAngle],CarInfo[car][cColorOne],CarInfo[car][cColorTwo],300);
					SendClientMessage(playerid, COLOR_GRAD2, "Type /avehicle to view the vehicle manual!");
				}
				else if(strcmp(x_nr,"edit",true) == 0)
				{
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: /edit [statcode] [amount]");
						SendClientMessage(playerid, COLOR_GRAD4, "|1 ID |2 Model |3 Owner |4 Owned ");
						return 1;
					}
					new stat;
					stat = strval(tmp);
					tmp = strtok(cmdtext, idx);
					if(!strlen(tmp))
					{
						SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: /edit [statcode] [amount]");
						SendClientMessage(playerid, COLOR_GRAD4, "|1 ID |2 Model |3 Owner |4 Owned ");
						return 1;
					}
					new amount;
					amount = strval(tmp);
					if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
					{
						new vehid = GetPlayerVehicleID(playerid);
						if(IsAnPersonalCar(vehid))
						{
							switch (stat)
							{
								case 1:
								{
									CarInfo[vehid][cID] = amount;
									format(string, sizeof(string), "   The Car ID Was Set To %d", amount);
									SendClientMessage(playerid, COLOR_GREY, string);
								}
								case 2:
								{
									CarInfo[vehid][cModel] = amount;
									format(string, sizeof(string), "   The Car Model Was Set To %d", amount);
									SendClientMessage(playerid, COLOR_GREY, string);
								}
								case 3:
								{
									GetPlayerName(amount, sendername, sizeof(sendername));
									strmid(CarInfo[vehid][cOwner], sendername, 0, strlen(sendername), 999);
									format(string, sizeof(string), "   The Car Owner Was Set To %s", sendername);
									SendClientMessage(playerid, COLOR_GREY, string);
								}
								case 4:
								{
									CarInfo[vehid][cOwned] = amount;
									format(string, sizeof(string), "   The Car Owned Was Set To %d", amount);
									SendClientMessage(playerid, COLOR_GREY, string);
								}
							}
							SaveCar(vehid);
						}
						else
						{
							SendClientMessage(playerid, COLOR_GREY, "This car isn't an personal car");
							return 1;
						}
					}
					else
					{
						SendClientMessage(playerid, COLOR_GREY, "You must be in an personal car");
						return 1;
					}
				}
				else if(strcmp(x_nr,"info",true) == 0)
				{
					if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
					{
						new vehid = GetPlayerVehicleID(playerid);
						format(string, sizeof(string), "Owned: %d | Owner: %s | CarColor1: %d | CarColor2: %d | CarID: %d", CarInfo[vehid][cOwned], CarInfo[vehid][cOwner], CarInfo[vehid][cColorOne], CarInfo[vehid][cColorTwo], CarInfo[vehid][cID]);
						SendClientMessage(playerid, COLOR_WHITE, string);
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_WHITE, "HINT: (/av)ehicle [name]");
					SendClientMessage(playerid, COLOR_WHITE, "Available names: destroy, create, edit, info");
					return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "You must be an admin to use this command");
				return 1;
			}
		}
	}

trebuie sa dai mi se pare /setstat nume 21 id-ul la masina scri /mycar

Link to comment
Share on other sites

gata am rezolvat ms mult toxic dar mai am o problema sa nu deschid alt topic postez tot aici

imi da un warning la fast-event

warningu:

[pawn]C:\Documents and Settings\Administrator\My Documents\Downloads\server by Dynamic\gamemodes\gf-dynamic.pwn(58645) : warning 235: public function lacks forward declaration (symbol "ReactionTest")[/pawn]

linia la care da warning

[pawn]public ReactionTest() // aici da warningu

{

KillTimer(ReactionTimer);

new string[80];

if(PassiveMode == PASSIVE_OFF)

{

new Rstr[] = "aAbBcCdDeEfFgGhHIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789";//Characters that will appear in the reaction test. Small "i" removed as it looks the same as a capital "i" in game.

for (new i = 0; i < 9; i++)ReactionString = Rstr[random(sizeof(Rstr))];

ReactionCash = random( MAX_WINNINGS - MIN_WINNINGS ) + MIN_WINNINGS;

}

else PassiveMode = PASSIVE_OFF;

ReactionState = R_STATE_ACTIVE;

format(string,sizeof(string),"{FFFFFF}** Primul care scrie{00CC00} %s {FFFFFF}castiga {00CC00}%d$!",ReactionString,ReactionCash);

SendClientMessageToAll(0xDA1800FF,string);

ReactionTimer = SetTimer("ReactionTest",REACTION_TIME*1000*60,true);

return 1;

}[/pawn]

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.