Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Coded by: Willian Luigi.
- Language: C++(Pawn plug-in).
- Example of kickPlayerEx(with reason).
- OBS: a mensagem vale para todos menos para o player que estava levando o kick.
- */
- cell AMX_NATIVE_CALL kickPlayer(AMX* amx, cell* params)
- {
- cell* addr = (0);
- char* motivo = (NULL);
- char temp[128];
- int
- tam = (0);
- amx_GetAddr(amx, params[2], &addr);
- amx_StrLen(addr, &tam);
- motivo = new char[tam + 1];
- amx_GetString(motivo, addr, NULL, tam);
- sprintf(temp, "id %d foi kikado por: %s", params[1], motivo);
- if (g_Invoke->callNative(&PAWN::SendClientMessageToAll, -1, temp))
- {
- delete[] motivo;
- }
- g_Invoke->callNative(&PAWN::Kick, params[1]);
- return logprintf("(kickPlayer log): Player %d kikado com sucesso.", params[1]), 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement