#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
dcmd(kill, 4, cmdtext); dmcd(slap, 4, cmdtext);
dcmd_kill(playerid, params[]) { DidKill[playerid] = 1; SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_ORANGE, "You committed suicide."); return 1; } dcmd_slap(playerid, params[]) { new id; if(strlen(params)) { id = strval(params); if(IsPlayerConnected(id)) { if(PlayerInfo[playerid][AdminLevel] > 1) { new Float:px, Float:py, Float:pz; GetPlayerPosition(playerid, px, py, pz); SetPlayerPosition(playerid, px, py, pz+15); SendClientMessage(playerid, } else { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } } else { SendClientMessage(playerid, COLOR_GREY, "Invalid Player ID."); } } else { SendClientMessage(playerid, COLOR_GREY, "Usage: /slap (playerid)" } return 1; }
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\edited.pwn(1421) : error 017: undefined symbol "dmcd" C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\edited.pwn(2081) : warning 203: symbol is never used: "params" C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\edited.pwn(2120) : warning 203: symbol is never used: "dcmd_slap" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
dcmd_slap(playerid, params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /Slap <ID>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected");
if(PlayerInfo[playerid][AdminLevel] > 1)
{
new Float:px, Float:py, Float:pz;
GetPlayerPosition(id, px, py, pz);
SetPlayerPosition(id, px, py, pz+15);
SendClientMessage(id,COLOR_GREY,"You just been slapped, bitch!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
new id,id2,id3,id4;
if(sscanf(params,"uuuu",id,id2,id3,id4)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /bring p1 p2 p3 p4");
SetPlayerPos(id,2384.60, -1674.36, 14.75);
SetPlayerPos(id2,2384.60, -1674.36, 14.75);
SetPlayerPos(id3,2384.60, -1674.36, 14.75);
SetPlayerPos(id4,2384.60, -1674.36, 14.75);