Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- event onLoad(){
- database.execute(
- "CREATE TABLE IF NOT EXIST `playerinfo` (
- `steamid` VARCHAR(17) NOT NULL,
- `name` VARCHAR(255) NOT NULL,
- `description` VARCHAR(255) NOT NULL,
- `age` INT(11) NOT NULL,
- PRIMARY KEY (`steamid`));"
- );
- }
- playerInfoFormat = "INSERT INTO playerinfo (PlayerName, Description, Age, steamid) VALUES ('{0}', '{1}', '{2}', '{3}');";
- command createinfo(arg, description, age){
- permission = "adminci";
- execute() {
- if(arguments.count !=3){
- player.message("Badly placed command: /createinfo <player> <description> <age>", "red");
- return;
- }
- argPlayer = toPlayer(arg);
- if(isPlayer(argPlayer) == false){
- player.message("Player not found", "red");
- return;
- }
- database.execute(str.format(playerInfoFormat, argPlayer.name, dt.now.string));
- player.message("You have registered " + argPlayer.name + " whit this data " + description + " , " + age + "green");
- argPlayer.message("You are now a citizen thanks to " + player.name + " whit this data " + description + " , " + age + "green");
- }
- }
- playerInfoF = "SELECT FROM playerinfo (PlayerName, Description, Age, SteamId) VALUES ('{0}', '{1}', '{2}', '{3}');";
- command info(startPlayer) {
- permission = "infocity";
- execute(){
- argPlayer = toPlayer(startPlayer);
- if(isPlayer(argPlayer) == false){
- player.message("Player not found", "red");
- return;
- }
- if(arguments.count !=0) {
- player.message("Badly placed command: /info <player>>", "red");
- return;
- }
- database.execute(str.format(playerInfoF, argPlayer, dt.now.string));
- player.message("The citizen has been registered with this data " + argPlayer + ", " + description + ", " + age + "green");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement