16.01.2009, 13:24
ehm, i wanna get the /god and /me to work. but it doesnt :S here is the full script:
and i get this:
but the warnings ain't the point to why im askin for help, im askin for help cuz it doesnt work :S so plz help, and give me the full script in a code thanx :mgreen:
Code:
/* SA:MP /god and /me commands * Made by My_Waffles_Bitch */ //============================================================================== #include <a_samp> #define CMDS true #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 //============================================================================== dcmd_me(playerid, params[] ) { new msg[128]; if (sscanf(params, "s",msg)) { format(s,sizeof(s),"%s:[USAGE]: /me <MESSAGE>",icommands); return SendClientMessage(playerid,COLOR_SYSTEM,s); } if(PlayerInfo[playerid][mute]) { return 0; } else { format(s,sizeof(s),"%s %s",PlayerName(playerid),msg); SendClientMessageToAll(COLOR_WHITE,s); WriteLog(clearlog,s); } return true; } dcmd_god(playerid, params[] ) { if(God[playerid] == 0) { God[playerid] = 1; new pName[MAX_PLAYER_NAME]; new string[48]; GetPlayerName(playerid, pName, sizeof(pName)); SendClientMessageToAll(0xAAAAAAAA,"%s has turned Godmode on.",pName); } else { God[playerid] = 0; new pName[MAX_PLAYER_NAME]; new string[48]; GetPlayerName(playerid, pName, sizeof(pName)); SendClientMessageToAll(0xAAAAAAAA,"%s has turned godmode off.",pName); SetPlayerHealth(playerid, 100); } return true; }
Code:
C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\god-me.pwn(32) : warning 203: symbol is never used: "dcmd_god" C:\Users\Martin\Desktop\PUTDETHERINTILSA-MP\god-me.pwn(32 -- 52) : warning 203: symbol is never used: "dcmd_me" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.