SA-MP Forums Archive
ShowCard / HELP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ShowCard / HELP (/showthread.php?tid=375121)



ShowCard / HELP - Scott Zulkifli - 05.09.2012

pawn Код:
ShowmeCard(playerid,targetid)
{
    if(IsPlayerConnected(targetid)) {
        SendClientMessageEx(playerid, COLOR_GREEN,"___________________________________________________________________________________________________");
        new sext[16];
        if(PlayerInfo[targetid][pSex] == 1) { sext = "Male"; } else { sext = "Female"; }
        new age = PlayerInfo[targetid][pAge];
        new housekey = PlayerInfo[targetid][pPhousekey];
        new housekey2 = PlayerInfo[targetid][pPhousekey2];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(targetid, name, sizeof(name));
        if(PlayerInfo[targetid][pPhousekey] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey]][hOwner]);
        if(PlayerInfo[targetid][pPhousekey2] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey2]][hOwner]);
        new coordsstring[128];
        format(coordsstring, sizeof(coordsstring),"Name: %s ",GetPlayerNameEx(targetid);
        SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        format(coordsstring, sizeof(coordsstring),"Sex: %s | Age: %d ",sext, age);
        SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        format(coordsstring, sizeof(coordsstring), "Num.House %d | Num.House 2: %d", housekey,housekey2);
        SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
        SendClientMessageEx(playerid, COLOR_GREEN,"___________________________________________________________________________________________________");
    }
}
I think this is an error at:
Quote:

if(PlayerInfo[targetid][pPhousekey] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey]][hOwner]);
if(PlayerInfo[targetid][pPhousekey2] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey2]][hOwner]);

and underneath this....


Re: ShowCard / HELP - TaLhA XIV - 05.09.2012

State that what is wrong and tell that what error you get.


Re: ShowCard / HELP - TheArcher - 05.09.2012

What are the errors? also what housekey & housekey2 variable are used for?

I.e

From
pawn Код:
if(PlayerInfo[targetid][pPhousekey] != INVALID_HOUSE_ID .........
To
pawn Код:
if(housekey != INVALID_HOUSE_ID ............