27.07.2014, 06:50
(
Последний раз редактировалось TheChaoz; 29.07.2014 в 00:04.
)
pawn Код:
#include <a_samp> // => http://sa-mp.com/download.php
#include <zcmd> // => forum.sa-mp.com/showthread.php?t=91354
#include <sscanf2> // => https://sampforum.blast.hk/showthread.php?tid=120356
#include <YSI\y_stringhash> // => https://sampforum.blast.hk/showthread.php?tid=169354
COMMAND:ejemplo(playerid, params[]){
new opciones[20];
if(sscanf(params, "s[20]", opciones)) return SendClientMessage(playerid, -1, "escribe el comando /ejemplo [opciones (texto1-texto2-texto3-texto4)] ");
switch (YHash(opciones)){
case _H<texto1>:{//opcion 1
//tu funcion...
}
case _H<texto2>:{//opcion 2
//tu funcion...
}
case _H<texto3>:{//opcion 3
//tu funcion...
}
case _H<texto4>:{//opcion 4
//tu funcion...
}
default:{//ninguna opcion
//tu funcion...
}
}
return true;
}