Jump to content
  • 0

Ajutor GetPlayerName


mApY.

Question

Nici cum nu reusesc sa fac sa ii ia numele jucatorului ...

De ex. eu dau /carinfo si am numele bogdan sa apara bogdan's vehicle

Comanda

[pawn] if(strcmp(cmd, "/carinfo", true) == 0)

{

if(IsPlayerConnected(playerid))

    {

        new str[128];

    new name[MAX_PLAYER_NAME+1], str[24+MAX_PLAYER_NAME+1];

    GetPlayerName(playerid, name, sizeof(name));

new coordsstring[256];

            new carkey = PlayerInfo[playerid][pCurentKey];

new stext[20];

if(CarInfo[carkey][cLock] == 1) { stext = "Locked"; }

else if(CarInfo[carkey][cLock] == 0) { stext = "Unlocked"; }

            if (PlayerInfo[playerid][pCurentKey] != -1)

    {

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

format(str, sizeof(str),"** %s's vehicle **", name);

        format(string, sizeof(string), "Model:[%s] Standard Price:[%s] Color:[%d - %d] VehicleID:[%d] Plate:[%s]", CarInfo[carkey][cDescription], number_format(CarInfo[carkey][cValue]), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], carkey,CarInfo[carkey][cLicense]);

        SendClientMessage(playerid, COLOR_GRAD3,string);

        format(string, sizeof(string), " Times Destroyed:[%d] Insurances:[%d] Insurance Price:[$%s] Locked:[%s]", CarInfo[carkey][cTD], CarInfo[carkey][cInsurance], number_format(CarInfo[carkey][cInsurancePrice]), stext);

        SendClientMessage(playerid, COLOR_GRAD3,string);

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

    }

}

return 1;

}[/pawn]

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

Am pus

[pawn] if(strcmp(cmd, "/carinfo", true) == 0)

{

if(IsPlayerConnected(playerid))

    {

  new name[MAX_PLAYER_NAME];

GetPlayerName(playerid, name, sizeof(name));

new coordsstring[256];

            new carkey = PlayerInfo[playerid][pCurentKey];

new stext[20];

if(CarInfo[carkey][cLock] == 1) { stext = "Locked"; }

else if(CarInfo[carkey][cLock] == 0) { stext = "Unlocked"; }

            if (PlayerInfo[playerid][pCurentKey] != -1)

    {

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

format(coordsstring, sizeof(coordsstring),"** %s's vehicle **",name);

        format(string, sizeof(string), "Model:[%s] Standard Price:[%s] Color:[%d - %d] VehicleID:[%d] Plate:[%s]", CarInfo[carkey][cDescription], number_format(CarInfo[carkey][cValue]), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], carkey,CarInfo[carkey][cLicense]);

        SendClientMessage(playerid, COLOR_GRAD3,string);

        format(string, sizeof(string), " Times Destroyed:[%d] Insurances:[%d] Insurance Price:[$%s] Locked:[%s]", CarInfo[carkey][cTD], CarInfo[carkey][cInsurance], number_format(CarInfo[carkey][cInsurancePrice]), stext);

        SendClientMessage(playerid, COLOR_GRAD3,string);

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

    }

}

return 1;

}[/pawn]

Tot nu merge.

Link to comment
Share on other sites

[pawn]if(strcmp(cmd, "/carinfo", true) == 0)

{

if(IsPlayerConnected(playerid))

    {

        new str[128];

    new name[ 24 ], str[ 1000 ];

    GetPlayerName(playerid, name, 24);

new coordsstring[256];

            new carkey = PlayerInfo[playerid][pCurentKey];

new stext[20];

if(CarInfo[carkey][cLock] == 1) { stext = "Locked"; }

else if(CarInfo[carkey][cLock] == 0) { stext = "Unlocked"; }

            if (PlayerInfo[playerid][pCurentKey] != -1)

    {

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

format(str, sizeof(str),"** %s's vehicle **", name);

        format(string, sizeof(string), "Model:[%s] Standard Price:[%s] Color:[%d - %d] VehicleID:[%d] Plate:[%s]", CarInfo[carkey][cDescription], number_format(CarInfo[carkey][cValue]), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], carkey,CarInfo[carkey][cLicense]);

        SendClientMessage(playerid, COLOR_GRAD3,string);

        format(string, sizeof(string), " Times Destroyed:[%d] Insurances:[%d] Insurance Price:[$%s] Locked:[%s]", CarInfo[carkey][cTD], CarInfo[carkey][cInsurance], number_format(CarInfo[carkey][cInsurancePrice]), stext);

        SendClientMessage(playerid, COLOR_GRAD3,string);

SendClientMessage(playerid, COLOR_GREEN,"____________________________________________");

    }

}

return 1;

}[/pawn]

idiots.png
Link to comment
Share on other sites

Ma ajutat DarkyTheAngel ... cum vrete sa imi dai sa pun string 1000 :| ? Doamnee

format(str, sizeof(str),"** %s's vehicle **", name);

        format(string, sizeof(string), "Model:[%s] Standard Price:[%s] Color:[%d - %d] VehicleID:[%d] Plate:[%s]", CarInfo[carkey][cDescription], number_format(CarInfo[carkey][cValue]), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], carkey,CarInfo[carkey][cLicense]);

Asta era tot cacatu ca era 2 stringuri una dupa alta fara SCM

Link to comment
Share on other sites

Ma ajutat DarkyTheAngel ... cum vrete sa imi dai sa pun string 1000 :| ? Doamnee

format(str, sizeof(str),"** %s's vehicle **", name);

        format(string, sizeof(string), "Model:[%s] Standard Price:[%s] Color:[%d - %d] VehicleID:[%d] Plate:[%s]", CarInfo[carkey][cDescription], number_format(CarInfo[carkey][cValue]), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], carkey,CarInfo[carkey][cLicense]);

Asta era tot [censured by the system] ca era 2 stringuri una dupa alta fara SCM

Si acum tu trebuie sa imi faci mie spume ca tu copiezi comenzi din alte GM si ceri sa rezolvam ?

Daca am pus string 1000 te doare mana sa schimbi ? Poate or avea si oamenii astia probleme dar ce va intereseaza pe voi ?

idiots.png
Link to comment
Share on other sites

Te rog nu vorbi daca nu sti ... comanda si tot aveam in GM dar am vrut sa faca

nume's Vehicle .... atat

Vad ca lumea vrea totul pe tava . Daca tu stii sa rezolvi si te consideri mai bun si pe mine un [censured by the system] de ce nu ai rezolvat tu ? Se mai si greseste dar voi nu vreti totul perfect sa fie xD Si cine zice ca eu nu stiu ? Esti vreun mare scripter ? Sa imi zica Darky Gireada Rock ca sunt un nestiutor nu tu

idiots.png
Link to comment
Share on other sites

Anakin" post="139803" timestamp="1365962658"]

Vad ca lumea vrea totul pe tava . Daca tu stii sa rezolvi si te consideri mai bun si pe mine un [censured by the system] de ce nu ai rezolvat tu ? Se mai si greseste dar voi nu vreti totul perfect sa fie xD Si cine zice ca eu nu stiu ? Esti vreun mare scripter ? Sa imi zica Darky Gireada Rock ca sunt un nestiutor nu tu

Esti un "nestiutor" 21.gif.Ti-ar zice si Rock dar el nu mai are cont 21.gif.

P.S: Rog un moderator pe aceasta sectiune sa inchida acest topic ca, vad ca se lasa cu "scanteie" 21.gif.

Link to comment
Share on other sites

stock GetName( playerid )
{
	new _RocKzSk[ MAX_PLAYER_NAME ];
 	GetPlayerName( playerid, _RocKzSk, sizeof _RocKzSk );
  	return ( _RocKzSk );
}

Un stock din Drift Worldul lui Rock, in loc de name pune GetName(playerid)

PS:nu uitati, Rock vede tot ! (asa mia zis acum cateva zile)

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.