Quick Help +1ReP
#1

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/frep", cmdtext, true, 10) == 0)
{
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /frep [Text]");
WaitTimeForCMD[playerid]=GetTickCount();
new string[128];
new name[32];
GetPlayerName(playerid, name, 32);
format(string, sizeof(string), "name=%s&posttext=%s", name);
HTTP(playerid, HTTP_POST, "sfcnrrpg.web44.net/forum/", string, "MyHTMLError");
return 1;
}
return 0;
}

Okay the CMD works ingame but look at the post it did i wrote the Explanation after but it still not working I will +1 Rep for help
http://sfcnrrpg.web44.net/forum/show...om-Brad_Nunchr

Idk why
Reply
#2

I'm not sure buddy but shouldn't this return an error?You have 2 %s's and one param later
Код:
format(string, sizeof(string), "name=%s&posttext=%s", name);
Reply
#3

Nope, it didnt
Reply
#4

Try this
Код:
format(string, sizeof(string), "name=%s&posttext=%s", name, params);
Reply
#5

Nope
Reply
#6

Maybe I didn't understand what you need.I noticed that the "Explanation" field was empty and you want to fill it?
Reply
#7

Yes I want to fill it with the persons message
Reply
#8

Try getting a bigger string? like new string[200] and change the name string to 24 which is the max length of a player's name
and can you show me your callback?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)