CMD:recibir(playerid,params[]) { new item[32], string[280]; if(sscanf(params, "s[50]", item)) return 1; { if(strcmp(item, "stats", true) == 0) { if(Info[playerid][pLevel] == 1) { new pName[32]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "ЎFelicitaciones! tu stats fueron sedidos a tu personajes y guardados correctamente espero que te diviertas ;).", GetPlayerNameEx(playerid)); SendClientMessage(playerid, COLOR_GENERAL, "Te hemos regalado 1kk en mano y nivel 5."); SendClientMessage(playerid, COLOR_GENERAL, "te regalamos 600 DZ, 10000g de Crack, 8000 medicamentos y 15000 Piezas de Armas."); Info[playerid][pLevel] = 5; GivePlayerCash(playerid, 750000); Info[playerid][pTotem] = 20; Info[playerid][pVZ] += 600; Info[playerid][pCrack] += 10000; Info[playerid][pMats] += 15000; Info[playerid][pPot] += 8000; Info[playerid][pConnectTime] = 2; Info[playerid][pWRestricted] = 0; SetCameraBehindPlayer(playerid); OnPlayerSavedStats(playerid); string="{FFFFFF}Gracias por jugar a DrugerZone Roleplay. Aquн recibirбs tus stats iniciales.\n\n{2AA0F5}Bueno recibiste tus stats, miralos en /est e /inventario{FFFFFF} para ver todo lo que te dio el servidor."; ShowPlayerDialog(playerid, INVENTARIO, DIALOG_STYLE_MSGBOX,"{2AA0F5}DrugerZone Roleplay",string,"Ok",""); } } } return 1; }
CMD:recibir{ new item[Fenixozne]; newstring , [Fenixozne]; No copiar otro servidor esos Stats muy altos [Pawns****]; |
crashea el sscanf |
new item[50], string[280];
if(sscanf(params, "s[50]", item)) return 1;
{
Hola gente de Forum Samp, bueno, descubrн que un comando, si lo usas mal a propуsito, crashea el sscanf
Aca dejo el comando: Код:
CMD:recibir(playerid,params[]) { new item[32], string[280]; if(sscanf(params, "s[50]", item)) return 1; { if(strcmp(item, "stats", true) == 0) { if(Info[playerid][pLevel] == 1) { new pName[32]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "ЎFelicitaciones! tu stats fueron sedidos a tu personajes y guardados correctamente espero que te diviertas ;).", GetPlayerNameEx(playerid)); SendClientMessage(playerid, COLOR_GENERAL, "Te hemos regalado 1kk en mano y nivel 5."); SendClientMessage(playerid, COLOR_GENERAL, "te regalamos 600 DZ, 10000g de Crack, 8000 medicamentos y 15000 Piezas de Armas."); Info[playerid][pLevel] = 5; GivePlayerCash(playerid, 750000); Info[playerid][pTotem] = 20; Info[playerid][pVZ] += 600; Info[playerid][pCrack] += 10000; Info[playerid][pMats] += 15000; Info[playerid][pPot] += 8000; Info[playerid][pConnectTime] = 2; Info[playerid][pWRestricted] = 0; SetCameraBehindPlayer(playerid); OnPlayerSavedStats(playerid); string="{FFFFFF}Gracias por jugar a DrugerZone Roleplay. Aquн recibirбs tus stats iniciales.\n\n{2AA0F5}Bueno recibiste tus stats, miralos en /est e /inventario{FFFFFF} para ver todo lo que te dio el servidor."; ShowPlayerDialog(playerid, INVENTARIO, DIALOG_STYLE_MSGBOX,"{2AA0F5}DrugerZone Roleplay",string,"Ok",""); } } } return 1; } |
CMD:recibir(playerid, params[])
{
new item[7];
if(sscanf(params, "s[6]", item))
return SendClientMessage(playerid, -1, "Uso: /recibir stats");
if(Info[playerid][pLevel] > 1)
return SendClientMessage(playerid, -1, "ERROR: No eres administrador!");
if(strcmp(item, "stats", true) == 0)
{
SendClientMessage(playerid, -1, "ЎFelicitaciones! tu stats fueron sedidos a tu personajes y guardados correctamente espero que te diviertas!");
SendClientMessage(playerid, -1, "Te hemos regalado 1kk en mano y nivel 5.");
SendClientMessage(playerid, -1, "te regalamos 600 DZ, 10000g de Crack, 8000 medicamentos y 15000 Piezas de Armas.");
Info[playerid][pLevel] = 5; GivePlayerCash(playerid, 750000);
Info[playerid][pTotem] = 20; Info[playerid][pVZ] += 600;
Info[playerid][pCrack] += 10000; Info[playerid][pMats] += 15000;
Info[playerid][pPot] += 8000; Info[playerid][pConnectTime] = 2;
Info[playerid][pWRestricted] = 0; SetCameraBehindPlayer(playerid);
OnPlayerSavedStats(playerid);
new string[205];
strcat(string, "{FFFFFF}Gracias por jugar a DrugerZone Roleplay. Aquн recibirбs tus stats iniciales.\n\n{2AA0F5}Bueno recibiste tus stats, \
miralos en /est e /inventario{FFFFFF} para ver todo lo que te dio el servidor.");
ShowPlayerDialog(playerid, INVENTARIO, DIALOG_STYLE_MSGBOX, "{2AA0F5}DrugerZone Roleplay", string, "Ok", "");
}
return true;
}
Otro bobo mбs abriendo estas mierdas de servidores con 0 conocimiento de programaciуn, veo por ejemplo un error obvio ahн que puede ser la causa, pero ni ganas de ver otra mierda de estas online.
|
SendClientMessage(playerid, -1, "ЎFelicitaciones! tu stats fueron sedidos a tu personajes y guardados correctamente espero que te diviertas!"); SendClientMessage(playerid, -1, "Te hemos regalado 1kk en mano y nivel 5."); SendClientMessage(playerid, -1, "te regalamos 600 DZ, 10000g de Crack, 8000 medicamentos y 15000 Piezas de Armas."); |
CMD:recibirstats(playerid,params[])
{
new string[280];
if(sscanf(params, "s[50]", item)) return 1;
if(Info[playerid][pLevel] > 1) return SendClientMessage(playerid, COLOR_GENERAL, "Solo para usuarios con nivel 1.");
new pName[32];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "ЎFelicitaciones! tu stats fueron cedidos a tu personajes y guardados correctamente espero que te diviertas ;).", GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_GENERAL, "Te hemos regalado 1kk en mano y nivel 5.");
SendClientMessage(playerid, COLOR_GENERAL, "te regalamos 600 DZ, 10000g de Crack, 8000 medicamentos y 15000 Piezas de Armas.");
Info[playerid][pLevel] = 5;
GivePlayerCash(playerid, 750000);
Info[playerid][pTotem] = 20;
Info[playerid][pVZ] += 600;
Info[playerid][pCrack] += 10000;
Info[playerid][pMats] += 15000;
Info[playerid][pPot] += 8000;
Info[playerid][pConnectTime] = 2;
Info[playerid][pWRestricted] = 0;
SetCameraBehindPlayer(playerid);
OnPlayerSavedStats(playerid);
string="{FFFFFF}Gracias por jugar a DrugerZone Roleplay. Aquн recibirбs tus stats iniciales.\n\n{2AA0F5}Bueno recibiste tus stats, miralos en /est e /inventario{FFFFFF} para ver todo lo que te dio el servidor.";
ShowPlayerDialog(playerid, INVENTARIO, DIALOG_STYLE_MSGBOX,"{2AA0F5}DrugerZone Roleplay",string,"Ok","");
return 1;
}