whats wrong with this
#1

it just says Gir Says: when it should say Gir Says: text here
Quote:

if(strcmp(cmd, "/girtalk", true) == 0)
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says:", cmdtext[6]);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}

Reply
#2

pawn Код:
if(strcmp(cmd, "/girtalk", true) == 0)
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says: %s", cmdtext[6]);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}
Try that. Not pretty sure that it will work, just gave it a go. Test it, and leave me a reply please. I could increase my experience every time I help anyone.
Reply
#3

use dcmd, or zcmd, Is much better.

pawn Код:
CMD:girtalk(playerid,params[]);
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says: %s", params);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}
Is that simple.
Reply
#4

it was actually :
format(str, sizeof(str), "Gir Says: %s", cmdtext[8]);
other than that its good
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)