/pm System/ Engine
#3

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
pawn Код:
if(!strcmp("/pm", cmdtext, true, 3))
{
    new tmp[256], gMessage[256], idx, Message[256];
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,0x3A47DEFF,"USAGE: /PM (id) (message)");
    new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);
    if(!strlen(gMessage)) return SendClientMessage(playerid,0xFF0000FF,"Usage: /pm (id) (message)");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"/pm :Invalid ID");
    new iName[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
    GetPlayerName(id,iName,sizeof(iName));
    GetPlayerName(playerid,pName,sizeof(pName));
    format(Message,sizeof(Message),">> %s(%i): %s",iName,id,gMessage);
    SendClientMessage(playerid,0xFFD720FF,Message);
    format(Message,sizeof(Message),"** %s(%i): %s",pName,playerid,gMessage);
    SendClientMessage(id,0xFFD720FF,Message);
    PlayerPlaySound(id,1085,0.0,0.0,0.0);
    return 1;
}
pawn Код:
C:\Users\Darian.Jennifer-PC\Desktop\OkBACKUP\BVGRP.pwn(15471) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Darian.Jennifer-PC\Desktop\OkBACKUP\BVGRP.pwn(15471) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Users\Darian.Jennifer-PC\Desktop\OkBACKUP\BVGRP.pwn(15475) : error 017: undefined symbol "strrest"
C:\Users\Darian.Jennifer-PC\Desktop\OkBACKUP\BVGRP.pwn(15475) : error 033: array must be indexed (variable "gMessage")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply


Messages In This Thread
/pm System/ Engine - by Bam23 - 27.03.2011, 03:40
Re: /pm System/ Engine - by Mr_Scripter - 27.03.2011, 04:00
Re: /pm System/ Engine - by Bam23 - 27.03.2011, 04:12
Re: /pm System/ Engine - by Austin - 27.03.2011, 04:12
Re: /pm System/ Engine - by Mr_Scripter - 27.03.2011, 04:14
Re: /pm System/ Engine - by Bam23 - 27.03.2011, 04:14
Re: /pm System/ Engine - by Stigg - 27.03.2011, 04:16
Re: /pm System/ Engine - by Austin - 27.03.2011, 04:46
Re: /pm System/ Engine - by Bam23 - 27.03.2011, 04:51
Re: /pm System/ Engine - by Grim_ - 27.03.2011, 05:54

Forum Jump:


Users browsing this thread: 1 Guest(s)