Jump to content

Razvann

Membru
  • Posts

    252
  • Joined

  • Last visited

    Never

Posts posted by Razvann

  1. CMD:startrace(playerid,params[])
    {
    	if(IsPlayerInRangeOfPoint(playerid,7,2096.3289, 1284.3533, 10.0142))
    	{
    		SetPlayerInterior(playerid,0);
    		SetTimer("CountDown",10000,0);
    		SendClientMessageToAll(yellow,"The Race {FF000}was been started ,Type /Race {FFFAAAF}to join,Race Will Start In 10 Seconds");
    		SendClientMessage(playerid,yellow," Type /LeaveRace To exit");
    		TogglePlayerControllable(playerid,0);
    		Race[playerid] = 1;
    		return 1;
    	}
    	else return SCM(playerid,yellow, "You Can't {FF000} start race ..{FFFAAAF}Type /Race and try again");
    }

    incearca asta...

  2. [pawn]

    if(CarInfo[newcar][cOwned]==1)

        {

            format(string,sizeof(string),"Vehicle bought to %s",CarInfo[newcar][cOwner]);

    SendClientMessage(playerid, COLOR_BLUE, string);

                                    return 1;

        }

    }

    gLastCar[playerid] = newcar;

    gLastDriver[newcar] = playerid;

    }[/pawn]

  3. bine identat script...

    [pawn]

    if (VehicleSystem[vehicleid][cLock]==0)

    {

    SetVehicleParamsForPlayer(vehicleid,i,0,1);

    }

    else if (VehicleSystem[vehicleid][cLock]==1)

    {

    SetVehicleParamsForPlayer(vehicleid,i,0,0);

    }[/pawn]

    pt ca folosesti asta, mereu cand intrii intr-o masina daca este blocata apoi se deblocheaza si invers. incearca sa dezactivezi asta si vezi ce se intampla

  4. [pawn]id = mysql_insert_id();[/pawn]

    apoi foloseste

    [pawn]PlayerInfo[playerid][pPcarkey] = id;[/pawn]

    btw: nu trebuie sa creezi variabile pentru x, y, z, angle etc..

    [pawn]

    format(Query, sizeof(Query), "INSERT INTO `cars` (`Model`, `Locationx`, `Locationy`, `Locationz`, `Angle`, `Owner`, `Description`, `Value`, `License`) VALUES ('%d','2783.9478', '-2494.4778', '13.6550', '85.6610','%s','%s','%d','%s')",model,sendername,description,value,license);

    CreateVehicle(model, CarInfo[id][cLocationx], CarInfo[id][cLocationy], CarInfo[id][cLocationz], CarInfo[id][cAngle], 999999);[/pawn]

    + ca value nu e definit => o sa fie = 0, la fel si license.. modelul este introdus prin dialog, daca pui de ex 612 (care nu exista) vor aparea buguri

  5. Nu ai inteles,deci playerul cumpara o masina,cand playerul o cumpara atunci este creata.

    Dar nu reusesc sa ii trec cheia de la masina pe numele lui atunci cand o cumpara.

    Nu am ce cod sa postez..vreau doar o idee cum as putea sa fac pe mysql.

    dude, nu trebuie niciun cod mysql atunci cand el este conectat, folosesti:

    [pawn]PlayerInfo[playerid][pPcarkey] = id;[/pawn]

    sau ce ai tu. nu am de unde sa stiu cum ai codul, de asta ti-am spus, iar pt mysql:


    new szName[MAX_PLAYER_NAME], szQuery[256];
    GetPlayerName(playerid, szName, sizeof(szName));
    format(szQuery, sizeof(szQuery), "UPDATE `tabelulptplayeri` SET CarKey = %d WHERE Name = '%s'", idmasina, szName);
    mysql_query(szQuery);

    posteaza variabilele si numele la tabele/row-uri ca se te pot ajuta :|

  6. Am facut un sistem de masini personale pe mysql,masina se creaza cand este folosita comanda.

    La id-ul masinii folosesc Auto_Increment..dar nu reusesc sa setez cheia masinii la playeri.Asta trebuie tot prin mysql.

    Vreo idee?

    postezi codul sa te putem ajuta..

    vrei ca masina sa fie setata cat timp playerul e offline/online?

  7. not , was very easy , thanx !! , but : [pawn]C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5674) : warning 219: local variable "Textdraw0" shadows a variable at a preceding level

    C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5676) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw0"

    C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5676) : warning 215: expression has no effect

    C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5676) : error 001: expected token: ";", but found "]"

    C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5676) : error 029: invalid expression, assumed zero

    C:\Users\Gabi\Desktop\Cruciatii Gamemode\samp03\gamemodes\EFL.pwn(5676) : fatal error 107: too many error messages on one line

    Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    4 Errors.[/pawn]

    la :

    [pawn]format(string, sizeof string, "Level: %d", PlayerInfo[playerid][pLevel]);

    5676 - TextDrawSetString(Text: Textdraw0[playerid], string);

    TextDrawShowForPlayer(playerid, Text: Textdraw0[playerid]);[/pawn]

    tu gandesti cand copiezi ceva? ti-am scris tot codul, si o iei tot pe a ta? :|

    in Dmnz invata sa dai copy si paste

  8. omfg:

    [pawn]

    new Text: LevelText[MAX_PLAYERS];

    LevelText[playerid] = TextDrawCreate(X, Y, "--");

    TextDrawBackgroundColor(LevelText[playerid], -65281);

    TextDrawFont(LevelText[playerid], 2);

    TextDrawLetterSize(LevelText[playerid], 0.509948, 1.399999);

    TextDrawColor(LevelText[playerid], 16711935);

    TextDrawSetOutline(LevelText[playerid], 1);

    TextDrawSetProportional(LevelText[playerid], 1);

    //OnPlayerConnect

    new string[64];

    format(string, sizeof string, "Level: %d", PlayerInfo[playerid][pLevel]);

    TextDrawSetString(Text: LevelText[playerid], string);

    TextDrawShowForPlayer(playerid, Text: LevelText[playerid]);

    //OnPlayerSpawn

    [/pawn]

    was that hard?

  9. Cand dai Click cu o anumita arma sa iti apara un dialog cum pot sa fac asa ceva

    am incerc sa fac

    [pawn]public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)

    {

        GetPlayerWeapon( playerid ) == 41 ) && (newkeys & (KEY_FIRE)) == (KEY_FIRE))

    ///linii[/pawn]

    [pawn]if(newkeys & KEY_FIRE && GetPlayerWeapon(playerid) == 41)[/pawn]

  10. [pawn]

    CMD:respawn(playerid,params[ ]) {

    new giveplayerid,string[128];

    if(IsPlayerConnected(playerid)) {

    if(sscanf(params,"u",giveplayerid)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /respawn [playerid/PartOfName]");

    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use that command.");

    if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GRAD2, "That player is offline.");

    SpawnPlayer(giveplayerid);

    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

    MedicBill[giveplayerid] = 0;

    GetPlayerName(playerid, sendername, sizeof(sendername));

    format(string, sizeof(string), "* You have respawned player %s.", giveplayer);

    SendClientMessage(playerid, COLOR_LIGHTRED, string);

    format(string, sizeof(string), "* You have been respawned by Admin %s.", sendername);

    SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);

    format(string, 256, "AdmWarning: %s has respawned the player %s (/respawn).", sendername, giveplayer);

    ABroadCast(COLOR_YELLOW,string,1);

    }

    return 1;

    }

    [/pawn]

    daca nu ai zcmd si sscanf in gm, te sfatuiesc sa le bagi

  11. roach, el nu a dat detalii despre cum sa fie comanda asa ca nu te mai baga aiurea :)

    btw, daca functia returnata este pozitiva nu are nevoie de paranteze, decat cele false, doh

    nu pune in onplayercommandtext, langa

    trebuia sa mai detaliezi si tu

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