11.01.2015, 08:35
PHP код:
CMD:aeject(playerid,params[])
{
new TargetID, Reason[100], name[24], tname[24], str[100];
if(pdata[playerid][Adminstator] < 2) return SendClientMessage(playerid,Red,"Command not found! Type /cmds");
if(sscanf(params, "uS()[100])",TargetID,Reason)) return SendClientMessage(playerid,Red,"Eject player from vehicle: /aj <id> <reason>");
if(!IsPlayerConnected(TargetID)) return SendClientMessage(playerid,Red,"Player is not connected");
if(!IsPlayerInAnyVehicle(TargetID)) return SendClientMessage(playerid,Red,"Player is not in vehicle");
{
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"%s %s ejected you: %s",AdminLevel(playerid),name,Reason);
SendClientMessage(TargetID,Red,str);
RemovePlayerFromVehicle(TargetID);
}
PHP код:
sscanf warning format specifier does not match parameter count