Message problem
#10

Quote:
Originally Posted by Meller
View Post
Dear non common sense people, let's see how he's trying to output his code:
This code is taken from the same gamemode as his:
PHP Code:
SendStats(playerid,targetid) {
    new 
msg[508];
    
query[0] = 0;
    new 
name[250];
    if(
GetPVarInt(targetid"DonateRank") < 1)
    {
        
format(name,sizeof(name),"                                    {FF0000}%s",GetPlayerNameEx(targetid,ENameType_CharName));
    }
    if(
GetPVarInt(targetid"DonateRank") > && GetPVarInt(playerid"DonateRank") < 4)
    {
        
format(name,sizeof(name),"                                    {FFFF00}%s",GetPlayerNameEx(targetid,ENameType_CharName));
    }
    if(
GetPVarInt(targetid"DonateRank") == 4)
    {
        
format(name,sizeof(name),"                                    {FF33FF}%s",GetPlayerNameEx(targetid,ENameType_CharName));
    }
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
new spousename[MAX_PLAYER_NAME+1];
    
GetPVarString(targetid"SpouseName"spousenamesizeof(spousename));
    
format(msg,sizeof(msg),"{FFFFFF}Level:[%s] Sex:[%s] Cash:[$%s] Bank:[$%s] Spouse:[%s]\n",getNumberString(GetPVarInt(targetid,"Level")),GetSexName(GetPVarInt(targetid,"Sex")),getNumberString(GetPVarInt(targetid,"Money")),getNumberString(GetPVarInt(targetid,"Bank")),spousename);
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    if(
GetPVarInt(targetid"DonateRank") < 1)
    {
        
format(msg,sizeof(msg),"{FFFFFF}DonateRank:[%s] Donate Points:[%s] Phone:[%d] LottoNr:[%d] Job:[%s]\n",GetDonateRank(GetPVarInt(targetid,"DonateRank")),getNumberString(GetPVarInt(targetid,"DonatePoints")),GetPVarInt(targetid,"PhoneNumber"),getPlayerLottoTicket(targetid),GetJobName(GetPVarInt(targetid,"Job")));
    }
    if(
GetPVarInt(targetid"DonateRank") > && GetPVarInt(playerid"DonateRank") < 4)
    {
        
format(msg,sizeof(msg),"{FFFFFF}DonateRank:[{FFFF00}%s{FFFFFF}] Donate Points:[{FFFF00}%s{FFFFFF}] Phone:[%d] LottoNr:[%d] Job:[%s]\n",GetDonateRank(GetPVarInt(targetid,"DonateRank")),getNumberString(GetPVarInt(targetid,"DonatePoints")),GetPVarInt(targetid,"PhoneNumber"),getPlayerLottoTicket(targetid),GetJobName(GetPVarInt(targetid,"Job")));
    }
    if(
GetPVarInt(targetid"DonateRank") == 4)
    {
        
format(msg,sizeof(msg),"{FFFFFF}DonateRank:[{FF33FF}%s{FFFFFF}] Donate Points:[{FF33FF}%s{FFFFFF}] Phone:[%d] LottoNr:[%d] Job:[%s]\n",GetDonateRank(GetPVarInt(targetid,"DonateRank")),getNumberString(GetPVarInt(targetid,"DonatePoints")),GetPVarInt(targetid,"PhoneNumber"),getPlayerLottoTicket(targetid),GetJobName(GetPVarInt(targetid,"Job")));
    }
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    
format(msg,sizeof(msg),"{FFFFFF}WantedLevel:[%d] TimesArrested:[%s] FightStyle:[%s]\n",GetPlayerWantedLevel(playerid),getNumberString(GetPVarInt(targetid,"TimesArrested")),GetFightStyle(GetPVarInt(targetid"FightStyle")));
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    new 
nextlevel = (GetPVarInt(targetid,"Level")+1);
    new 
expamount nextlevel*levelexp;
    
format(msg,sizeof(msg),"Respect:[%s/%s] SpecialItem:[%s] Hunger:[%d]\n",getNumberString(GetPVarInt(targetid,"RespectPoints")),getNumberString(expamount),GetPlayerCarryingItemName(targetid),GetHungerLevel(targetid));
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    
format(msg,sizeof(msg),"{FFFFFF}Cigars:[%s] LockPicks:[%s] FurnitureTokens:[%d] WTChan:[%d]\n",getNumberString(GetPVarInt(targetid"Cigars")),getNumberString(GetPVarInt(targetid"VehLockpicks")),GetPVarInt(targetid"FurnitureTokens"),GetPVarInt(targetid"WTChannel"));
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    
format(msg,sizeof(msg),"{FFFFFF}Pot:[%s Gram] Coke:[%s Gram] Meth:[%s Gram]\n",getNumberString(GetPVarInt(targetid"Pot")),getNumberString(GetPVarInt(targetid"Coke")),getNumberString(GetPVarInt(targetid"Meth")));
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    
format(msg,sizeof(msg),"{FFFFFF}Type A:[%s Packs] Type B:[%s Packs] Type C:[%s Packs]\n",getNumberString(GetPVarInt(targetid"MatsA")),getNumberString(GetPVarInt(targetid"MatsB")),getNumberString(GetPVarInt(targetid"MatsC")));
    
//SendClientMessage(playerid, COLOR_LIGHTRED, msg);
    
strcat(querymsgsizeof(query));
    new 
fid GetPVarInt(targetid,"Family");
    if(
fid != 0) {
        
fid FindFamilyBySQLID(fid);
    } else 
fid = -1;
    if(
fid == -&& GetPVarInt(targetid"Faction") != 0) {
        
fid GetPVarInt(targetid"Faction");
        
format(msg,sizeof(msg),"{FFFFFF}Faction:[%s] Rank:[%s]\n",GetFactionName(fid),getFactionRankName(fid,GetPVarInt(targetid"Rank")));
        
//SendClientMessage(playerid, COLOR_WHITE, msg);
        
strcat(querymsgsizeof(query));
        
    } else if(
fid != -1) {
        
format(msg,sizeof(msg),"{FFFFFF}Family:[%s] Rank:[%s]\n",GetFamilyName(fid),getRankName(fid,GetPVarInt(targetid"Rank")));
        
//SendClientMessage(playerid, COLOR_WHITE, msg);
        
strcat(querymsgsizeof(query));
    }
    
format(msg,sizeof(msg),"{FFFFFF}PlayingHours:[%s] NewbChat Rank:[%s] Cookies:[%s]\n",getNumberString(GetPVarInt(targetid,"ConnectTime")),GetNewbieName(targetid),getNumberString(GetPVarInt(targetid,"Cookies")));
    
//SendClientMessage(playerid, COLOR_WHITE, msg);
    
strcat(querymsgsizeof(query));
    
    new 
matpacks[3], drugpacks[3];
    
matpacks[0] = GetPVarInt(playerid"MatAPacks");
    
matpacks[1] = GetPVarInt(playerid"MatBPacks");
    
matpacks[2] = GetPVarInt(playerid"MatCPacks");
    
drugpacks[0] = GetPVarInt(playerid"PotSeeds");
    
drugpacks[1] = GetPVarInt(playerid"CokePlants");
    
drugpacks[2] = GetPVarInt(playerid"MethMaterials");
    if(
matpacks[0] != || matpacks[1] != || matpacks[2] != 0) {
        
format(msg,sizeof(msg),"{FFFFFF}MatAPacks:[%s] MatBPacks:[%s] MatCPacks:[%s]\n",getNumberString(matpacks[0]),getNumberString(matpacks[1]),getNumberString(matpacks[2]));
        
//SendClientMessage(playerid, COLOR_LIGHTRED, msg);
        
strcat(querymsgsizeof(query));
    }
    
    if(
drugpacks[0] != || drugpacks[1] != || drugpacks[2] != 0) {
        
format(msg,sizeof(msg),"{FFFFFF}PotSeeds:[%s] CokePlants:[%s] MethMaterials:[%s]\n",getNumberString(drugpacks[0]),getNumberString(drugpacks[1]),getNumberString(drugpacks[2]));
        
//SendClientMessage(playerid, COLOR_LIGHTRED, msg);
        
strcat(querymsgsizeof(query));
    }
    
    new 
jailtime GetPVarInt(targetid"ReleaseTime");
    if(
jailtime == 0) {
        
jailtime GetPVarInt(targetid"AJailReleaseTime");
    }
    
jailtime -= gettime();
    if(
jailtime 0) {
        
format(msgsizeof(msg), "{FFFFFF}Jail Time Left: %s sec\n"getNumberString(jailtime));
        
//SendClientMessage(playerid, isajail?COLOR_LIGHTRED:COLOR_WHITE, msg);
        
strcat(querymsgsizeof(query));
    }
    if(
EAdminFlags:GetPVarInt(playerid"AdminFlags") != EAdminFlags_None) {
        
format(msgsizeof(msg), "{FFFFFF}NumAJails:[%s] NumKicks:[%s] NumBans[%s] Wealth:[%s]\n",getNumberString(GetPVarInt(targetid"NumAJAils")),getNumberString(GetPVarInt(targetid"NumKicks")), getNumberString(GetPVarInt(targetid"NumBans")),getNumberString(getTotalWealth(targetid)));
        
//SendClientMessage(playerid, COLOR_LIGHTRED, msg);
        
strcat(querymsgsizeof(query));
    }
    
ShowPlayerDialog(playeridERP_ViewStatsDIALOG_STYLE_MSGBOXname,query,"Close""");
    
//SendClientMessage(playerid, COLOR_WHITE,"_______________________________________");

Don't play smartass with me next time, I know what strcat is.
You obviously don't.

Quote:
Originally Posted by Meller
View Post
He's using \n which by a quick thinking of "common sense" tells me that he's doing this for a dialog, which explains his "strcat".
It doesn't explain his strcat. Strcat concatenates two strings. It isn't a dialog exclusive function. It can be used anywhere two strings are present. Moving on;

Quote:

He's using \n

Could just be a console C scripter trying his luck with PAWN. The only one acting smart is you unfortunately.
Reply


Messages In This Thread
Message problem - by Barnwell - 04.07.2017, 00:07
Re: Message problem - by Meller - 04.07.2017, 00:29
Re: Message problem - by mongi - 04.07.2017, 00:31
Re: Message problem - by Rufio - 04.07.2017, 00:32
Re: Message problem - by Meller - 04.07.2017, 00:35
Re: Message problem - by Rufio - 04.07.2017, 00:36
Re: Message problem - by Meller - 04.07.2017, 00:37
Re: Message problem - by Barnwell - 04.07.2017, 00:41
Re: Message problem - by mongi - 04.07.2017, 00:45
Re: Message problem - by Rufio - 04.07.2017, 00:45
Re: Message problem - by Meller - 04.07.2017, 00:49
Re: Message problem - by Rufio - 04.07.2017, 00:51
Re: Message problem - by Meller - 04.07.2017, 00:54
Re: Message problem - by Rufio - 04.07.2017, 00:56
Re: Message problem - by Meller - 04.07.2017, 00:59
Re: Message problem - by Rufio - 04.07.2017, 01:01
Re: Message problem - by Sew_Sumi - 04.07.2017, 01:50
Re: Message problem - by Meller - 04.07.2017, 02:07
Re: Message problem - by Sew_Sumi - 04.07.2017, 02:14

Forum Jump:


Users browsing this thread: 1 Guest(s)