22.04.2011, 14:12
Now this is ******* strange,I dunno what happened I just took a look at this Pm system(https://sampforum.blast.hk/showthread.php?tid=164500), added it to my gamemode(of course I downloaded sscanf and zcmd) and added it to the bottom of my gamemdoe and I got this error while compiling:
Compiling errors:At
error 001: expected ";" token but found "{"
so I added ";" after that if statement and it compiled it right,but when I run samp-server.exe it gives me runtime error 19 couldn't find lsdm.amx but I have it on my gamemdoes folder What's wrong
pawn Код:
CMD:pm(playerid,params[])
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!")
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
SendClientMessage(playerid, 0xFF0000FF, str);
format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
SendClientMessage(id, 0xFF0000FF, str);
}
return 1;
}
pawn Код:
if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!")
{
so I added ";" after that if statement and it compiled it right,but when I run samp-server.exe it gives me runtime error 19 couldn't find lsdm.amx but I have it on my gamemdoes folder What's wrong