C:\Users\BladeGamingYT\Desktop\Headshot.pwn(37) : warning 202: number of arguments does not match definition C:\Users\BladeGamingYT\Desktop\Headshot.pwn(37) : warning 202: number of arguments does not match definition C:\Users\BladeGamingYT\Desktop\Headshot.pwn(40) : warning 202: number of arguments does not match definition C:\Users\BladeGamingYT\Desktop\Headshot.pwn(40) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.
#include <a_samp> #include <zcmd> #define COLOR_WHITE 0xFFFFFFAA public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Headshot system by Abdullah420 "); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID) { if(IsPlayerConnected(issuerid)) { if(weaponid == 33 || weaponid == 34) { if(bodypart == 9) { new playerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, playerName, sizeof(playerName)); new otherName[MAX_PLAYER_NAME]; GetPlayerName(issuerid, otherName, sizeof(otherName)); SetPlayerHealth(playerid, 0); GameTextForPlayer(issuerid,"~r~Headshot",2000,3); PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0); SendClientMessage(issuerid, COLOR_WHITE, "{FF0000}You have killed {FFFF00}%s(%i){FF0000} with a Headshot!", playerName, playerid); GameTextForPlayer(playerid,"~r~Headshot",2000,3); PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_WHITE, "{FF0000}You have been killed in a Headshot by {FFFF00}%s(%i)!", otherName, issuerid); new msg[400]; format(msg, sizeof(msg), "{A7C4E4}%s(%i) has killed %s(%i) with a Headshot!", otherName, issuerid, playerName, playerid); SendClientMessageToAll(COLOR_WHITE, msg); } } } } return 1; }
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(IsPlayerConnected(issuerid))
{
if(weaponid == 33 || weaponid == 34)
{
if(bodypart == 9)
{
new string[256];
new playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
new otherName[MAX_PLAYER_NAME];
GetPlayerName(issuerid, otherName, sizeof(otherName));
SetPlayerHealth(playerid, 0);
GameTextForPlayer(issuerid,"~r~Headshot",2000,3);
PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
format(string,sizeof(string),"{FF0000}You have killed {FFFF00}%s(%i){FF0000} with a Headshot!", playerName, playerid");
SendClientMessage(issuerid, COLOR_WHITE,string);
GameTextForPlayer(playerid,"~r~Headshot",2000,3);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
format(string,sizeof(string),"{FF0000}You have been killed in a Headshot by {FFFF00}%s(%i)!", otherName, issuerid");
SendClientMessage(playerid, COLOR_WHITE,string);
new msg[400];
format(msg, sizeof(msg), "{A7C4E4}%s(%i) has killed %s(%i) with a Headshot!", otherName, issuerid, playerName, playerid);
SendClientMessageToAll(COLOR_WHITE, msg);
}
}
}
}
return 1;
}
new msg1[400]; format(msg1, sizeof(msg1), "{FF0000}You have killed {FFFF00}%s(%i){FF0000} with a Headshot!", playerName, playerid); SendClientMessage(issuerid, COLOR_WHITE, msg1);
new msg2[400]; format(msg2, sizeof(msg2), "{FF0000}You have been killed in a Headshot by {FFFF00}%s(%i)!", otherName, issuerid); SendClientMessage(playerid, COLOR_WHITE, msg2);
You should use format for both the SendClientMessage like you did for SendClientMessageToAll!
Line 37: Код:
new msg1[400]; format(msg1, sizeof(msg1), "{FF0000}You have killed {FFFF00}%s(%i){FF0000} with a Headshot!", playerName, playerid); SendClientMessage(issuerid, COLOR_WHITE, msg1); Код:
new msg2[400]; format(msg2, sizeof(msg2), "{FF0000}You have been killed in a Headshot by {FFFF00}%s(%i)!", otherName, issuerid); SendClientMessage(playerid, COLOR_WHITE, msg2); |