|POMOC|Admin vozilo


Započeo Tommy_Vercetty, Mart 16, 2016, 20:45:00 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

ubacio sam ovo kao što si napisao ali kucam /av stvori se auto ali ne piše ništa od texta :D

Onda probaj ispod svakog AddStaticVehiclex-a staviti ovaj kod.

new newcar = GetPlayerVehicleID(playerid);
new vname[24], string[256];
new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
GetVehicleName(newcar, vname, sizeof(vname));
format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo[playerid][Admin],GetPlayerNameEx(playerid),vname);
VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
LegalGetIn[playerid] = 1;
PutPlayerInVehicle(playerid, newcar, 0);

pokusao sam kao što si rekao ali erori

C:\SAMP GAMEMODES\Space RolePlay v2.0 by B00TiC xD\Space RolePlay v2.0\gamemodes\spacerp.pwn(59821) : error 029: invalid expression, assumed zero
spacerp.pwn(59821) : warning 215: expression has no effect
spacerp.pwn(59821) : error 001: expected token: ";", but found "if"
spacerp.pwn(59826) : error 021: symbol already defined: "newcar"
spacerp.pwn(59827) : error 021: symbol already defined: "vname"
spacerp.pwn(59828) : error 021: symbol already defined: "x"
//////
evo cmd


CMD:av(playerid, params[])
{
	if(PlayerInfo[playerid][Admin] > 0)
	{
		new Float:X, Float:Y, Float:Z;
	    GetPlayerPos(playerid, X, Y, Z);
	    if(PlayerInfo[playerid][Admin] == 1)
	    {
	          AddStaticVehicleEx(560, X, Y, Z+5, 0, 0, 0, 6000);
	    }
	    else if(PlayerInfo[playerid][Admin] == 1338)
	    {
	          AddStaticVehicleEx(451, X, Y, Z+5, 0, 0, 0, 6000);
	    }
	    new newcar = GetPlayerVehicleID(playerid);
		new vname[24], string[256];
		new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
		GetVehicleName(newcar, vname, sizeof(vname));
		format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo[playerid][Admin],GetPlayerNameEx(playerid),vname);
		VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
		Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
		LegalGetIn[playerid] = 1;
		PutPlayerInVehicle(playerid, newcar, 0);
	    else if(PlayerInfo[playerid][Admin] == 1344)
	    {
	          AddStaticVehicleEx(415, X, Y, Z+5, 0, 0, 0, 6000);

	    }
	    new newcar = GetPlayerVehicleID(playerid);
  		new vname[24], string[256];
  		new Float:x,Float:y,Float:z; GetVehiclePos(newcar, x,y,z);
  		GetVehicleName(newcar, vname, sizeof(vname));
  		format(string,sizeof(string),"{2F5CBC}[Admin([%d]) {FFFFFF}%s {2F5CBC}Vozilo %s",PlayerInfo[playerid][Admin],GetPlayerNameEx(playerid),vname);
    	VoziloLabel = Create3DTextLabel(string, 0, x, y, z, 7, 0, 10);
  		Attach3DTextLabelToVehicle(VoziloLabel,newcar,0,0,0);
  		LegalGetIn[playerid] = 1;
		PutPlayerInVehicle(playerid, newcar, 0);
    }
	else
	{
	    SCM(playerid, COLOR_LIGHTBLUE, "Niste ovlaÅ¡teni da koristite ovu Komandu!");
	}
	return 1;
}

Radi, skontao sam kako si rekao,,, ali dole piše putplayerincar a auto se meni stvori iznad glave: KROSE HVALA BRT mozes reci kako da napravim da se auto spawna pokraj mene ili da sam odma u autu

Otvori novu.
You have enemies? Good. That means you've stood up for something, sometime in your life.