Jump to content

Tutorial v plate


wEEEk

Recommended Posts

Descriere tutorial: As vrea si eu un tutorial cu un 3dtext plate pe masina folosind comanda /v plate  sa fie pe dialog si sa fie ceva de genu LS-666-XXX

Dar sa poti schimba plate-ul asta dupa bunul plac cu acea comanda

Adica LS-666-xxx sa fie atunci cand playerul isi creeaza masina

Si atunci cand da /v plate sa ii apara cate un dialog de genu:

Orasul - aici sa scrie orasul

Cifrele- aici sa scrie cifrele

Numarul: - adica aici sa fie ceva de 2-3 litere

Multumesc as fi foarte recunoscator

 

Link to comment
Share on other sites

Ceva de genul asta?

 

CMD:vplate(playerid,params[])
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"Nu esti sofer");
    new ivID = GetPlayerVehicleID(playerid),plate[50];
    if(OwnedVeh(ivID) == 0) return SendClientMessage(playerid, COLOR_RED, "{FFFFFF}Nu esti intr-un vehicul personal"); //sau cum ai tu variabila de masina personala
    if(strcmp(vInfo[OwnedVeh(ivID)][vOwner], PlayerName(playerid))) return SCM(playerid,-1,"Acest vehicul nu iti apartine");
    if(sscanf(params, "s", plate)) return SendClientMessage(playerid, COLOR_WHITE,"Folosire: /vsetcode [codul]");
    if((strfind(plate, "LS", true) != -1))|| strfind(plate, "SF", true) != -1) 	 )
    {
        SetVehicleNumberPlate(ivID,text);
        SendClientMessage(playerid, COLOR_WHITE,"Ai inmatriculat masina!");
    }
    else   return SendClientMessage(playerid, COLOR_WHITE,"Nu ai scris orasul");
    return 1;
}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Salut posibil cauti asta:

if(strcmp(cmd, "/plate", true) == 0)
	        {
			    if(IsPlayerInVehicle(playerid, vehid) || PlayerInfo[vehid][pPcarkey] != -1 && PlayerInfo[vehid][pPcarkey2] != -1 && PlayerInfo[vehid][pPcarkey3] != -1)
				{
    			    if(cmdtext[idx++] != 32 || cmdtext[idx] == EOS)
                    {
                   	    SendClientMessage(playerid,0xFFFFFFAA,"Use: /plate [newplate]");
                        return 1;
				    }
				    new Text3D: Vehplate;
				    new Float:XX,Float:YY,Float:ZZ,Float:AA;
                    new Float:CarHP, Float:OldCarHP;
                    new panels,doors,lights,tires;
	                GetVehicleHealth(vehid, CarHP);
	                GetVehicleDamageStatus(vehid,panels,doors,lights,tires);
			        OldCarHP = CarHP;
				    format(CarInfo[vehid][cLicense], 32 ,"%s",cmdtext[idx]);
				    Delete3DTextLabel(Text3D:Vehplate);
			        Vehplate = Create3DTextLabel(CarInfo[vehid][cLicense], 0x33AAFFFF, 0.0, 0.0, 0.0, 20, 0, 1);
			        Attach3DTextLabelToVehicle(Vehplate, vehid, 0.0, 0.0, 1.2);
			        Update3DTextLabelText(Vehplate, 0x00FF00FF, CarInfo[vehid][cLicense]);
			        GetVehiclePos(vehid,XX,YY,ZZ);
	                GetVehicleZAngle(vehid, AA);
	                SetVehicleToRespawn(vehid);
	                SetVehiclePos(vehid,XX,YY,ZZ);
	                SetVehicleZAngle(vehid, AA);
	                PutPlayerInVehicle(playerid,vehid,0);
	                SetVehicleHealth(vehid, OldCarHP);
	                UpdateVehicleDamageStatus(vehid,panels,doors,lights,tires);
			        format(string, sizeof(string), "{DFF709}Vehicle Plate setat in: {FFFFFF}%s", CarInfo[vehid][cLicense]);
	                SendClientMessage(playerid, COLOR_WHITE, string);
	                OnPropUpdate(); SavePlayerData(playerid);
			        return 1;
	            }
	            else
	            {
                    SendClientMessage(playerid, COLOR_WHITE, "{DFF709}* Trebuie sa fi in vehiculul personal.");
				    return 1;
			    }
			}

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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