Socket message (issue) - 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: Socket message (issue) (
/showthread.php?tid=607132)
Socket message (issue) -
TheWay - 15.05.2016
Код:
new infVersion[12],
infPass[64],
infAction[64],
infParams[256];
sscanf(infParams,"p</>s[24]ds[24]s[32]",type,faction,name,code);
printf("\n %s %d %s %s",type,faction, code, name);
Код:
Printf: leader/2/Infin
Should be something like:
Код:
leader/2/InfiniTy./aj34hnbjk1
His name is: InfiniTy. and the code isn't send at all, if I move the code in the place of name, will be same thing, but instead of the code will be a blank space and the name will have same cut-off thing.
Re: Socket message (issue) -
BloodyRP - 15.05.2016
PHP код:
printf("%s %d %s %s",type,faction, name, code);
That is what u want ?

And u need to be sure that u have type[24],name[24],code[32];
Re: Socket message (issue) -
TheWay - 15.05.2016
That printf is put just to see whats the problem, I use these on SCM(); for notifications.
Код:
new type[24],faction,name[24],code[32];
printf("%s",infParams);
sscanf(infParams,"p</>s[24]ds[24]s[32]",type,faction,name,code);
printf("%s %d %s %s",type,faction, code, name);
if(!strcmp("faction",type)) {
foreach(new x : Player) {
if(PlayerData[x][pGroup] == faction && PlayerData[x][pGroupRank] == 7)
SCM(x, HP3,"[Notificare]: "HP22"%s a creat o noua aplicatie la factiunea ta. [Cod: "HP44"%s"HP22"]",name,code);
}
}
The result comes with no Code and 3/4 Name letters.