26.04.2012, 14:43
Код:
dcmd_pm(playerid, params[]) { new id, message2[81],string2[128]; if(sscanf(params, "us[81]", id,message2)) return SendClientMessage(playerid, COLOR_RED, "Usage: /pm (id/name) (message)"); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, RTNUSRNoResults); if(strlen(message2) < 1) return SendClientMessage(playerid, COLOR_RED, "Usage: /pm (id/name) (message)"); if(playerid == id) return SendClientMessage(playerid, COLOR_RED, NotOnYourself); if(message2[80]) return SendClientMessage(playerid, COLOUR_SYSTEM, "Error: Invalid PM Length. Your PM Must Be Between 1-80 Characters."); if(NotAcceptingPM[id] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot send a PM to this player, They have used /nopm."); if(MutedPlayer[playerid] == 1) return 0; format(string2,sizeof(string2),"PM From %s(%d): %s",UserStats[playerid][Name],playerid,message2); SendClientMessage(id,COLOR_YELLOW,string2); format(string2,sizeof(string2),"PM Sent To %s(%d): %s",UserStats[id][Name],id,message2); SendClientMessage(playerid,COLOR_YELLOW,string2); SetPVarInt(id, "LastMessage", playerid); return 1; } dcmd_r(playerid, params[]) return dcmd_reply(playerid, params); dcmd_privatemessage(playerid, params[]) return dcmd_pm(playerid, params); dcmd_reply(playerid, params[]) { new message2[81],string[128]; new id = GetPVarInt(playerid, "LastMessage"); if(sscanf(params, "s[81]", message2)) return SendClientMessage(playerid, COLOR_RED, "Usage: /reply (message)"); if(strlen(message2) < 1) return SendClientMessage(playerid, COLOR_RED, "Usage: /reply (message)"); if(message2[80]) return SendClientMessage(playerid, COLOUR_SYSTEM, "Error: Invalid PM Length. Your PM Must Be Between 1-80 Characters."); if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, RTNUSRNoResults); if(NotAcceptingPM[id] == 1) return SendClientMessage(playerid, COLOR_RED, "You cannot send a PM to this player, They have used /nopm."); format(string,sizeof(string),"PM From %s(%d): %s",UserStats[playerid][Name],playerid,message2); SendClientMessage(id,COLOR_YELLOW,string); format(string,sizeof(string),"PM Sent To %s(%d): %s",UserStats[id][Name],id,message2); SendClientMessage(playerid,COLOR_YELLOW,string); SetPVarInt(id, "LastMessage", playerid); return 1; } dcmd_nopm(playerid, params[]) { #pragma unused params if(NotAcceptingPM[playerid] == 1) { SendClientMessage(playerid,COLOR_RED,"* You have turned No-PM Feature Off! You can now receive messages!"); NotAcceptingPM[playerid] = 0; return 1; } if(NotAcceptingPM[playerid] == 0) { SendClientMessage(playerid,COLOR_RED,"* You have turned No-PM Feature On! You cannot receive any messages!"); NotAcceptingPM[playerid] = 1; return 1; } return 1; }
Код:
C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8878) : warning 217: loose indentation C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8878) : error 017: undefined symbol "RTNUSRNoResults" C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8879) : warning 217: loose indentation C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8880) : error 017: undefined symbol "NotOnYourself" C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8881) : error 017: undefined symbol "COLOUR_SYSTEM" C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8882) : error 017: undefined symbol "NotAcceptingPM" C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8882) : warning 215: expression has no effect C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8882) : error 001: expected token: ";", but found "]" C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8882) : error 029: invalid expression, assumed zero C:\DOCUME~1\BALOCH\MYDOCU~1\DOWNLO~1\SAMP03~1\GAMEMO~1\COPSAN~1.PWN(8882) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.