#include <a_samp> #include <core> #include <float> #include <sscanf2> #include <zcmd> #include <mSelection> #include "../include/gl_common.inc" #pragma tabsize 0 //---------- COLORES ----------------------- #define COLOR_BLANCO 0xFFFFFFFF #define COLOR_ROJO 0xFFFF0000 #define COLOR_AZUL 0xFF0000FF #define COLOR_AMARILLO 0xFFFFFF00 #define COLOR_VERDE 0xFF008000 #define COLOR_NARANJA 0xFFFFA500 #define COLOR_VERDECLARO 0xFFADFF2F #define COLOR_TEJA 0xFF00FFFF #define COLOR_GRIS 0xFF808080 //------------------------------------------ new DINERO_MATADOR=1000; new DINERO_MUERTO=-1000; new total_vehicles_from_files=0; new skinlist = mS_INVALID_LISTID; new skinactual[MAX_PLAYERS]; new bool: estado[MAX_PLAYERS]; //------------------------------------------ main( ) { } //---------------------------------------------------------- public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid,0); TogglePlayerClock(playerid,0); SetPlayerSkin(playerid,skinactual[playerid]); if (GetPlayerMoney(playerid) < 0) { ResetPlayerMoney(playerid); } return 1; } //---------------------------------------------------------- public OnPlayerDeath(playerid, killerid, reason) { //Bonificacion al Matador GivePlayerMoney(killerid,DINERO_MATADOR); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); //Acciones para el que Murio if (GetPlayerMoney(playerid) >= DINERO_MUERTO) { GivePlayerMoney(playerid,DINERO_MUERTO); } return 1; } public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"~g~~h~.::ASSHOLE::.",3000,0); SendClientMessage(playerid,COLOR_BLANCO,"Bienvenido a {3ADF00}.::ASSHOLE::."); SetPlayerColor(playerid,COLOR_BLANCO); new mensaje[128], nombre[24]; format(mensaje,128,"%s se ha conectado al servidor!",nombre); SendClientMessageToAll(COLOR_TEJA,mensaje); //---------- OTROS ---------- estado[playerid] = true; print(mensaje); return 1; }
Does it give you an error message when compiling? Or when you connect nothing happens?
|
print(mensaje);
print("mensaje");
#include <a_samp> #include <core> #include <float> #include <sscanf2> #include <zcmd> #include <mSelection> #include "../include/gl_common.inc" #pragma tabsize 0 //---------- COLORES ----------------------- #define COLOR_BLANCO 0xFFFFFFFF #define COLOR_ROJO 0xFFFF0000 #define COLOR_AZUL 0xFF0000FF #define COLOR_AMARILLO 0xFFFFFF00 #define COLOR_VERDE 0xFF008000 #define COLOR_NARANJA 0xFFFFA500 #define COLOR_VERDECLARO 0xFFADFF2F #define COLOR_TEJA 0xFF00FFFF #define COLOR_GRIS 0xFF808080 //------------------------------------------ new DINERO_MATADOR=1000; new DINERO_MUERTO=-1000; new total_vehicles_from_files=0; new skinlist = mS_INVALID_LISTID; new skinactual[MAX_PLAYERS]; new bool: estado[MAX_PLAYERS]; //------------------------------------------ main( ) { } //---------------------------------------------------------- public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid,0); TogglePlayerClock(playerid,0); SetPlayerSkin(playerid,skinactual[playerid]); if (GetPlayerMoney(playerid) < 0) { ResetPlayerMoney(playerid); } return 1; } //---------------------------------------------------------- public OnPlayerDeath(playerid, killerid, reason) { //Bonificacion al Matador GivePlayerMoney(killerid,DINERO_MATADOR); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); //Acciones para el que Murio if (GetPlayerMoney(playerid) >= DINERO_MUERTO) { GivePlayerMoney(playerid,DINERO_MUERTO); } return 1; } public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"~g~~h~.::ASSHOLE::.",3000,0); SendClientMessage(playerid,COLOR_BLANCO,"Bienvenido a {3ADF00}.::ASSHOLE::."); SetPlayerColor(playerid,COLOR_BLANCO); new mensaje[128], nombre[24]; format(mensaje,128,"%s se ha conectado al servidor!",nombre); SendClientMessageToAll(COLOR_TEJA,mensaje); //---------- OTROS ---------- estado[playerid] = true; print("mensaje"); return 1; } //----------------COMANDOS---------------------- CMD:sumar(playerid, params[]) { new v1, v2; if(sscanf(params,"dd", v1, v2))return SendClientMessage(playerid, COLOR_VERDECLARO, "[KE]: Como usar: '/sumar [valor1] [valor2]'"); new r=v1+v2; new resultado[30]; format(resultado,30,"El Resultado es: %d",r); SendClientMessage(playerid,COLOR_BLANCO,resultado); return 1; } CMD:kill(playerid, params[]) { SetPlayerHealth(playerid,0); } //---------------------------------------------------------- public OnPlayerRequestClass(playerid, classid) { TogglePlayerSpectating(playerid, true); ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); return 1; } //---------------------------------------------------------- public OnPlayerModelSelection(playerid, response, listid, modelid) { if(listid == skinlist) { if(response) { TogglePlayerSpectating(playerid, false); SpawnPlayer(playerid); SetPlayerSkin(playerid, modelid); skinactual[playerid] = modelid; SetPlayerPos(playerid, 2023.5839, 1545.2329, 10.8205); if (estado[playerid] == true) { GivePlayerWeapon(playerid,WEAPON_BAT,1); GivePlayerWeapon(playerid,WEAPON_COLT45,1); GivePlayerMoney(playerid,5000); SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200); } } else ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); return 1; } return 1; } //---------------------------------------------------------- public OnGameModeInit() { SetGameModeText(".::ASSHOLE::."); ShowPlayerMarkers(PLAYER_MARKERS_MODE_GLOBAL); UsePlayerPedAnims(); ShowNameTags(1); SetNameTagDrawDistance(50.0); EnableStuntBonusForAll(1); //DisableInteriorEnterExits(); SetWeather(2); SetWorldTime(10); UsePlayerPedAnims(); //ManualVehicleEngineAndLights(); // Player Class skinlist = LoadModelSelectionMenu("skins.txt"); // SPECIAL total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt"); // LAS VENTURAS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt"); // SAN FIERRO total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt"); // LOS SANTOS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt"); // OTHER AREAS total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt"); total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt"); printf("Total vehicles from files: %d",total_vehicles_from_files); return 1; } //---------------------------------------------------------- public OnPlayerUpdate(playerid) { if(!IsPlayerConnected(playerid)) return 0; // No weapons in interiors if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) { SetPlayerArmedWeapon(playerid,0); } else { SetPlayerArmedWeapon(playerid,1); } if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN) { SendClientMessage(playerid,COLOR_ROJO,"[KE]: no se permite minigun!"); Kick(playerid); return 0; } /* No jetpacks allowed if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) { Kick(playerid); return 0; }*/ return 1; }
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"~g~~h~.::ASSHOLE::.",3000,0);
SendClientMessage(playerid,COLOR_BLANCO,"Bienvenido a {3ADF00}.::ASSHOLE::.");
SetPlayerColor(playerid,COLOR_BLANCO);
new mensaje[128], nombre[24];
format(mensaje,128,"%s se ha conectado al servidor!",nombre);
SendClientMessageToAll(COLOR_TEJA,mensaje);
//---------- OTROS ----------
estado[playerid] = true;
printf("%s", mensaje);
return 1;
}
I didn't realize that you were trying to print the message text, you should use printf.
pawn Код:
|
public OnPlayerConnect(playerid)
{
print("OnPlayerConnect Called");
return 1;
}