Help me!
#1

Hey guys i am fake cmd to send on other players.

Here is command:

pawn Код:
COMMAND:fakecmd(playerid, params[])
{
    new string2[20];
    new TargetID, PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(TargetID, PlayerName, sizeof(PlayerName));
    if(sscanf(params, "us[20]", TargetID,string2)) return SendClientMessage(playerid, COLL_ORANGE, "Correct Usage: /FakeCmd (PlayerID/PartOfName) (Command).");
    SendClientMessage(playerid, 0x00FFFFFF, "Fake CMD Sent.");
    OnPlayerCommandText(TargetID,"%s",string2);
    return 1;
}
And the Errors:

pawn Код:
C:\Users\Axme\Desktop\SA-MP\Advanced Mission Server\filterscripts\oias.pwn(277) : error 004: function "zcmd_OnPlayerCommandText" is not implemented
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Thanks, Your help would be very apperciated.
Reply
#2

PHP код:
OnPlayerCommandText(TargetID,"%s",string2); 
I think you can't do it like this. I think you must do it like this:
PHP код:
COMMAND:fakecmd(playeridparams[])
{
    new 
string2[20],command[128];
    new 
TargetIDPlayerName[MAX_PLAYER_NAME];
    
GetPlayerName(TargetIDPlayerNamesizeof(PlayerName));
    if(
sscanf(params"us[20]"TargetID,string2)) return SendClientMessage(playeridCOLL_ORANGE"Correct Usage: /FakeCmd (PlayerID/PartOfName) (Command).");
    
SendClientMessage(playerid0x00FFFFFF"Fake CMD Sent.");
    
format(command,128,"%s",string2);
    
OnPlayerCommandText(TargetID,command);
    return 
1;

Reply
#3

Problem is shit Zcmd it says OnPlayerCommand is not implemented.

Thanks for your help.
Reply
#4

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
Problem is shit Zcmd it says OnPlayerCommand is not implemented.

Thanks for your help.
ZCMD ain't shit
Reply
#5

pawn Код:
COMMAND:fakecmd(playerid, params[])
{
    new string2[20];
    new TargetID, PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(TargetID, PlayerName, sizeof(PlayerName));
    if(sscanf(params, "us[20]", TargetID,string2)) return SendClientMessage(playerid, COLL_ORANGE, "Correct Usage: /FakeCmd (PlayerID/PartOfName) (Command).");
    SendClientMessage(playerid, 0x00FFFFFF, "Fake CMD Sent.");
    cmd_string2(TargetID/*,params*/);
    //or
    CallLocalFunction(string2,"d",TargetID);
    return 1;
}
Y U call zmcd shit?
Reply
#6

Lol no i don't, thanks for your help.
Reply
#7

pawn Код:
C:\Users\Axme\Desktop\SA-MP\Advanced Mission Server\filterscripts\oias.pwn(277) : error 017: undefined symbol "cmd_string2"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
What's wrong

It seems i have to define cmd_string2?

Thanks.
Reply
#8

My bad, edited.

Never seen the line lol.

Will edit with the answer now.
Reply
#9

pawn Код:
COMMAND:fakecmd(playerid, params[])
{
    new string2[20];
    new TargetID, PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(TargetID, PlayerName, sizeof(PlayerName));
    if(sscanf(params, "us[20]", TargetID,string2)) return SendClientMessage(playerid, COLL_ORANGE, "Correct Usage: /FakeCmd (PlayerID/PartOfName) (Command).");
    SendClientMessage(playerid, 0x00FFFFFF, "Fake CMD Sent.");
    cmd_string2(TargetID/*,params*/);
    //or
    //CallLocalFunction(string2,"s",TargetID);
    return 1;
}
Here is my cmd.
Reply
#10

Try putting this at the top.

pawn Код:
forward cmd_string2(targetid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)