Jump to content

Question

Posted

am si eu o problema la nfs club cand dau /clubinvite imi invita playerul iar dupa ce iese de pe server si revine nu mai este membru  nfs club...

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

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");

return 1;

}

new para1;

new ftext[20];

para1 = ReturnUser(tmp);

if(PlayerInfo[playerid][pClubLeader] >= 1)

{

if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

    if (PlayerInfo[para1][pClubMember] == 0)

    {

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

{

ftext = "NFS Club";

}

else if(PlayerInfo[playerid][pClubLeader] == 2)

{

ftext = "NRG Club";

}

else { return 1; }

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

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

PlayerInfo[para1][pClubMember] = PlayerInfo[playerid][pClubLeader];

PlayerInfo[para1][pClubRank] = 1;

printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);

format(string, sizeof(string), "  You have Joined the %s, you were invited by Leader %s", ftext, sendername);

SendClientMessage(para1, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "  You have Invited %s to join the %s.", giveplayer,ftext);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "  That player is currently Wanted / a Different Team.");

    return 1;

}

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command(club leaders only)!");

}

}

return 1;

}[/pawn]

9 answers to this question

Recommended Posts

Posted

Ai definit pClubMember la onplayerconnect,onplayerlogin,onplayerupdate,onplayergister si pInfo? pentru a se salva in .ini ?

Posted

[pawn]

        pNFS,

pClubLeader,

pClubMember,

pClubWarns,

pClubRank,[/pawn]

Nu am onplayerconnect :-?

[pawn]if( strcmp( key , "ClubRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClubRank] = strval( val ); }

    if( strcmp( key , "ClubMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClubMember] = strval( val ); }

    if( strcmp( key , "ClubLeader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClubLeader] = strval( val ); }

if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14) //DNB

    {

        SetPlayerToTeamColor(playerid);

SetPlayerPos(playerid, 1462.2960,2773.0686,10.8203);

SetPlayerInterior(playerid,0);

PlayerInfo[playerid][pInt] = 0;

GivePlayerWeapon(playerid, 24, 50);// Deagle

GivePlayerWeapon(playerid, 4, 1);// Cutit

        return 1;

    }[/pawn]

Nu am nici onplayergister

Iar pInfo am e definit

Posted

PlayerInfo[para1][pClubMember] = PlayerInfo[playerid][pClubLeader];// dc  PlayerInfo[[B]playerid[/B]][pClubLeader];?
PlayerInfo[para1][pClubRank] = 1;

esti sigur ca salvezi asta ? OnPlayerUpdate , OnPlayerLogin ?

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

Posted

Nu am  [pawn]PlayerInfo[playerid][pClubLeader][/pawn]

si la [pawn]PlayerInfo[para1][pClubRank] = 0;[/pawn] o sa modific si am sa pun 1 in loc de 0 poate asta era...

Posted

nu e nici de la asta...:|

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

{

    if(IsPlayerConnected(playerid))

    {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");

return 1;

}

new para1;

new ftext[20];

para1 = ReturnUser(tmp);

if(PlayerInfo[playerid][pClubLeader] >= 1)

{

if(IsPlayerConnected(para1))

    {

        if(para1 != INVALID_PLAYER_ID)

        {

    if (PlayerInfo[para1][pClubMember] == 0)

    {

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

{

ftext = "NFS Club";

}

else if(PlayerInfo[playerid][pClubLeader] == 2)

{

ftext = "NRG Club";

}

else { return 1; }

GetPlayerName(para1, giveplayer, sizeof(giveplayer));

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

PlayerInfo[para1][pClubMember] = PlayerInfo[playerid][pClubLeader];

PlayerInfo[para1][pClubRank] = 1;

printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);

format(string, sizeof(string), "  You have Joined the %s, you were invited by Leader %s", ftext, sendername);

SendClientMessage(para1, COLOR_LIGHTBLUE, string);

format(string, sizeof(string), "  You have Invited %s to join the %s.", giveplayer,ftext);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "  That player is currently Wanted / a Different Team.");

    return 1;

}

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command(club leaders only)!");

}

}

return 1;

}[/pawn]

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.