? is it about return 0; or return 1;?
C:\Documents and Settings\Administrator\Desktop\SOT\GTA SA Stuff\sampserv\gamemodes\PKDM.pwn(73) : error 017: undefined symbol "cmdtext" C:\Documents and Settings\Administrator\Desktop\SOT\GTA SA Stuff\sampserv\gamemodes\PKDM.pwn(73) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\SOT\GTA SA Stuff\sampserv\gamemodes\PKDM.pwn(73) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\SOT\GTA SA Stuff\sampserv\gamemodes\PKDM.pwn(73) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Administrator\Desktop\SOT\GTA SA Stuff\sampserv\gamemodes\PKDM.pwn(73) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
public OnGameModeInit()
{
dcmd(xkill, 5, cmdtext);
dcmd(money, 5, cmdtext);
return 0;
}
dcmd_xkill(playerid, params[])
{
new id;
if (sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/xkill <playerid>\"");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else
{
SetPlayerHealth(id, 0.0);
SendClientMessage(id, 0x00FF00AA, "You have been killed :o");
SendClientMessage(playerid, 0x00FF00AA, "Player killed");
}
dcmd_money(playerid, params[])
{
new money;
if (sscanf(params, "d", money))SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/money <ammount>\"");
else
{
GivePlayerMoney(playerid, money);
SendClientMessage(playerid, 0x00FF00AA, "[SUCESS]: Money Added");
}
return 1;
}

|
Originally Posted by Bcklup
Big_Smok3 said i should put it in OnGameModeInit
and i think i will need a simple script that has 2-5 dcmd commands in it |
https://sampwiki.blast.hk/wiki/Fast_Commands
sorry for causing problems.