[Ayuda] Con sscanf y zcmd
#2

CMD:trabajo(playerid, params[])
{
if(isnull(params))
{
return SendClientMessage(playerid, -1, "Uso: /trabajo [nombre-del-trabajo]");
}
if(strcmp(params, "fumigador", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0,414.7119,2535.5044,19.1484)) return SendClientMessage(playerid, -1, "No te encuentras donde se obtiene este trabajo.");
if(Informacion[playerid][Nivel] != 3) return SendClientMessage(playerid, -1, "Necesitas ser nivel 3 para poder trabajar de Fumigador Aereo.");
if(Informacion[playerid][Trabajo] > 1)
{
SendClientMessage(playerid, -1, "Actualmente tienes un trabajo, usa /abandonar trabajo e intenta de nuevo.");
return 1;
}
if(Informacion[playerid][Trabajo] == 1)
{
SendClientMessage(playerid, -1, "Ya tienes el trabajo, usa /ayuda trabajos si tienes problemas.");
return 1;
}
if(Informacion[playerid][Trabajo] == 0)
{
SendClientMessage(playerid,-1,"Felicidades por tu nuevo trabajo usa /ayuda trabajos si tienes alguna duda.");
Informacion[playerid][Trabajo] = 1;
return 1;
}
return 1;
}
if(strcmp(params, "medico", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 350.6645, 110.2836, 1023.7904)) return SendClientMessage(playerid, -1, "No te encuentras donde se obtiene este trabajo.");
if(Informacion[playerid][Nivel] >= 3)
{
if(Informacion[playerid][Trabajo] == 2)
{
SendClientMessage(playerid, -1, "Ya tienes el trabajo, usa /ayuda trabajos si tienes problemas.");
return 1;
}
if(Informacion[playerid][Trabajo] > 0)
{
SendClientMessage(playerid, -1, "Actualmente tienes un trabajo, usa /abandonar trabajo e intenta de nuevo.");
return 1;
}
if(Informacion[playerid][Trabajo] == 0)
{
SendClientMessage(playerid,-1,"Felicidades por tu nuevo trabajo usa /ayuda trabajos si tienes alguna duda.");
Informacion[playerid][Trabajo] = 2;
return 1;
}
} else SendClientMessage(playerid, -1, "Necesitas ser nivel 2 para poder trabajar de Medico.");
}
return 1;
}

Confirma si te sirviу.
Reply


Messages In This Thread
[Ayuda] Con sscanf y zcmd - by armandozetaxx - 28.10.2014, 00:13
Respuesta: [Ayuda] Con sscanf y zcmd - by jotajeda - 28.10.2014, 02:49

Forum Jump:


Users browsing this thread: 1 Guest(s)