Quote:
Originally Posted by Cruze
PHP Code:
#include <sourcemod> #include <cstrike> #include <customvotes>
#define MAX_SIZE 256
public void OnPluginStart() { RegConsoleCmd("sm_customvote", Command_CustomVote); }
public Action Command_CustomVote(int client, int args) { if (CustomVotes_IsVoteInProgress()) { return Plugin_Handled; } char sBuffer[MAX_SIZE]; GetCmdArgString(sBuffer, MAX_SIZE); ReplaceString(sBuffer, MAX_SIZE, "\\n", "<br>"); Format(sBuffer, MAX_SIZE, "<font color='#FF5500' class='fontSize-xxxl'>%s?</font>", sBuffer); CustomVoteSetup setup; setup.team = CS_TEAM_NONE; setup.initiator = client; setup.issue_id = VOTE_ISSUE_UNPAUSEMATCH; setup.dispstr = sBuffer; setup.disppass = "<font color='#3df218'>Vote Passed!</font>";
CustomVotes_Execute(setup, 15, Handler_CustomVotePassed, Handler_CustomVoteFailed);
return Plugin_Handled; }
public void Handler_CustomVotePassed(int results[MAXPLAYERS+1]) { //PrintToChatAll("[SM] Vote Passed. (%s)" ); }
public void Handler_CustomVoteFailed(int results[MAXPLAYERS+1]) { //PrintToChatAll("[SM] Vote Failed."); }
|
HTML Code:
CustomVotes_Execute(setup, 15, Handler_CustomVotePassed, Handler_CustomVoteFailed);
return Plugin_Handled;
}
public void Handler_CustomVotePassed(int results[MAXPLAYERS+1])
{
//PrintToChatAll("[SM] Vote Passed (%s) ", sBuffer);
}
hi how can i send sBuffer data to Handler_CustomVotePassed so i can print the information?
(sBuffer is just an example)
i want to use player names and ...