PM errors
#4

Quote:
Originally Posted by oMa37
Посмотреть сообщение
This should work:

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) 

    if(
strcmp("/pm"cmdtexttrue10) == 0
    { 
        new 
str[128],id,text[50],pname[MAX_PLAYER_NAME]; 
        if(
sscanf(params"us[50]"idtext)) SendClientMessage(playerid0xFF0000FF"Usage: /pm <id> <message>"); 
        else if(
id == INVALID_PLAYER_IDSendClientMessage(playerid0xFF0000FF"ERROR: Player not connected"); 
        if(
playerid == idSendClientMessage(playerid0xFF0000FF"ERROR: You cannot pm yourself!"); 
        else 
        { 
            
GetPlayerName(idpnamesizeof(pname)); 
            
format(strsizeof(str), "PM To %s(ID %d): %s"pnameidtext); 
            
SendClientMessage(playerid0xFF0000FFstr); 
            
GetPlayerName(playeridpnamesizeof(pname)); 
            
format(strsizeof(str), "PM From %s(ID %d): %s"pnameplayeridtext); 
            
SendClientMessage(id0xFF0000FFstr); 
        } 
        return 
1
    } 
    return 
0

PHP код:
D:\myownscript\gamemodes\fgrp.pwn(164) : error 017undefined symbol "params"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

I'm getting this error.
Reply


Messages In This Thread
PM errors - by xXtremeXx - 27.06.2016, 12:08
Re: PM errors - by F1N4L - 27.06.2016, 12:11
Re: PM errors - by oMa37 - 27.06.2016, 12:11
Re: PM errors - by xXtremeXx - 27.06.2016, 12:22
Re: PM errors - by Stinged - 27.06.2016, 12:39
Re: PM errors - by jlalt - 27.06.2016, 12:40
Re: PM errors - by F1N4L - 27.06.2016, 12:48
Re: PM errors - by jlalt - 27.06.2016, 12:58

Forum Jump:


Users browsing this thread: 1 Guest(s)